Hi everyone,
I have the following code:
protocol A: Identifiable where ID==String {
// something here
}
class B {
var listOfA: [A]
}
Now the compiler gives error "can only be used as a generic constraint...". I understand this error, I mean I understand why the associated type ID can normally be different things for different implementations. But my question is: what is wrong in this particular case where we put the constraint ID == String? Why do we still have ambiguity in this case?