swift - Provide concrete type for Generic Protocol implementation -
is possible following:
protocol a: class { typealias t: anyobject } extension { func testa(a:self, _ t:t)->void{ print(a, t) } } class b:a { typealias t = string }
in other words have protocol , want provide concrete type in class conforms it.
that should fine. issue code have there string
not anyobject
.
you need:
protocol a: class { typealias t } extension { func testa(a:self, _ t:t)->void{ print(a, t) } } class b:a { typealias t = string }
Comments
Post a Comment