Compiling following code:
protocol Foo {
associatedtype Element
}
protocol IntFoo: Foo where Element == Int {
}
struct A: IntFoo {
}
let intFoo: IntFoo = A()
produces error message: Protocol 'IntFoo' can only be used as a generic constraint because it has Self or associated type requirements
.
Didn't I just specify an associated type requirement or am I doing it wrong?