I gave some code that looks like this:
protocol PAT {
associatedtype R
}
protocol Foo {
associatedtype Body: PAT
func body<Bar: PAT>(for bar: Bar) -> Body
}
And I'm wondering why this doesn't work:
struct Baz: Foo {
func body<Bar: PAT>(for bar: Bar) -> some PAT {
}
}
This generates a compiler error: Baz
doesn't conform to Foo
.