Closed arthurhammer closed 8 years ago
The generic type accepts protocols. That is why there is no restriction. In swift we cannot restrict to a protocol only.
Later i will check the bug you mention!
Thanks for your response. I found this comment in the tests. I guess using structs is indeed not indented (as I think it shouldn't be). It's unfortunate that we cannot restrict this in the API.
Correct you are not supposed to add structs or enums as delegates.
Thanks!
Example:
Basically I'm wondering, why the generic type
T
is not restricted to classes.