S
はどこから来たの?? protocol GameObject { associatedtype ObjectShape: Shape var shape: ObjectShape } struct Player: GameObject { var shape: some Shape { ... } /* infers typealias Shape = opaque result type of Player.shape */ } let sv: S.SomeType // ok: names the opaque result type of S.someValue() sv = S().someValue() // ok: returns the same opaque result type
https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md#associated-type-inference (edited)