Swift compiler crashes

Originator:m.purland
Number:rdar://17614889 Date Originated:7/9/2014
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6 beta 3
Classification: Reproducible:Always
 
Swift compiler crashes. This seems to be because the Swift class extends NSObject. If you remove the class from extending NSObject it compiles successfully.

Source:
class ArrayDataSource<T>: NSObject {
    var items: [T]
    
    init(items: [T]) {
        self.items = items
    }
    
    func itemForIndexPath(indexPath: NSIndexPath) -> T {
        return self.items[indexPath.row]
    }
}

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!