let result: Int = f7(-i)
は禁止だけど func f7(_ i: Int) -> some P { if i == 0 { return f7(1) // ok: returning our own opaque result type } else if i < 0 { let result: Int = f7(-i) // error: opaque result type of f7() is not convertible to Int return result } else { return 0 // ok: grounds the recursion with a concrete type } }
Player.ObjectShape
に some Shape
を入れようとしてもこのケースではエラーにならないよってことでは?