App does not compile when using generics in Swift

Originator:seyithan
Number:rdar://22047625 Date Originated:2015-07-29
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification:Bug Reproducible:Always
 
App does not compile when you use a public Swift 2.0 class with generics that inherits from NSObject in a dynamic framework.

Steps to Reproduce:
1. Create iOS project.
1. Add a Dynamic Framework.
2. Add a class.
3. Add a class with a generic type such as: 
public class MyGenericClass<ClassType where ClassType: MyClass>: NSObject
4. Add an array property of the class with generic: 
public var objectArray: [ClassType] = []
5. Compile.

Expected Results:
Project compiles with no problem

Actual Results:
Project does not compile

Version:
Xcode Version 7.0 beta 4 (7A165t)
OS X El Capitan 10.11 Beta (15A235d)

Notes:
https://github.com/ProstetnicSth/SwiftObjcGenericBug

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!