Why protocols
property is translated as [AnyObject] in swift, not as [P]
@protocol P;
@class C;
@interface TestGenerics: NSObject
@property NSArray<C*>* classes;
@property NSArray<P>* protocols;
@end
In Swift it look this way:
public class TestGenerics : NSObject {
public var classes: [C]
public var protocols: [AnyObject]
}
UPDATE: Found solution
@property NSArray<NSObject<P>*>* protocols;
or like suggested newacct
@property NSArray<id<P>>* protocols;
is translated to:
public var protocols: [P]