编译以下代码:
protocol Foo {
associatedtype Element
}
protocol IntFoo: Foo where Element == Int {
}
struct A: IntFoo {
}
let intFoo: IntFoo = A()
产生错误消息:Protocol 'IntFoo' can only be used as a generic constraint because it has Self or associated type requirements
。
我不只是指定关联的类型要求还是我做错了吗?