Avatar
↓の 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 } }
3:12 AM
ちょっと違うか
3:13 AM
でも、 Player.ObjectShapesome Shape を入れようとしてもこのケースではエラーにならないよってことでは?