Avatar
Avatar
koher
any Sequence って self-conform してるんですっけ? @swift-5.7.3 struct Foo {} protocol Bar { associatedtype Foos: Sequence where Foos.Element == Foo var foos: Foos { get } } struct Baz: Bar { var foos: [Foo] { [Foo()] } } let bar: any Bar = Baz() for foo in bar.foos as any Sequence { print(foo) }
Foo()