Avatar
↓がもし通るならややこしそう。 protocol P { associatedtype F: Foo func foos() -> (F, F) } protocol Q { associatedtype F: Foo associatedtype G: Foo func foos() -> (F, G) } struct S: P { // これはエラーになる? func foos() -> (some Foo, some Foo) { /* ... */ } } struct T: Q { func foos() -> (some Foo, some Foo) { /* ... */ } } (edited)