Swift compiler crashes when building of instantiating a class (see attached project).

Originator:serieuxchat
Number:rdar://21176676 Date Originated:31-May-2015
Status:Closed Resolved:
Product:Developer Tools Product Version:6.3.2 and 6.4 beta
Classification: Reproducible:Always
 
TestProtocol inherits from NSObjectProtocol and TestClass inherits from NSObject and conforms to TestProtocol.
TestProtocol defines an initializer method.

The Swift compiler crashes with a segmentation fault when:

- TestClass class is created with NSClassFromString()
- An instance of TestClass is created/initialized with the initializer method provided by TestProtocol and implemented by TestClass.

Steps to Reproduce:
- Open the attached project file.
- Build

Expected Results:
The build should either complete successfully if such kind of instantiating is allowed or should issue a proper error if it's not allowed.


Actual Results:
The compiler crashes instead with a Segmentation Fault

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!