Xcode 6.3.1: Swift - Objective-C Bridge: Swift Instance Methods can be called like Class Methods from Objective-C, compiling without error, but crashing at runtime

Originator:fabian.ehrentraud
Number:rdar://20855568 Date Originated:07-May-2015 06:07 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 6.3.1 (6D1002)
Classification:Serious Bug Reproducible:Always
 
Summary:
An instance method on a Swift class, that does NOT inherit from NSObject can be called from Objective-C like a class method. It does compile, even though it should not. It crashes at runtime which is pretty dangerous.

Steps to Reproduce:
* Example Project: https://github.com/fabb/MissingCompileError.git
* Compiles fine, but crashes at runtime

Expected Results:
Should not compile.

Actual Results:
Compiles but crashes at runtime.

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!