Using as a concrete type conforming to protocol AnyObject is not supported
I ran into the same problem when I tried to implement weak containers. As @plivesey points out in a comment above, this seems to be a bug in Swift 2.2 / Xcode 7.3, but it is expected to work. However, the problem does not occur for some Foundation protocols. For example, this compiles: let container … Read more