I have an Objective C class SomeClass
which has a nullable property:
@property (nonatomic, strong) __nullable ClassA* clsAProperty;
In a Swift 1.2 (Xcode 6.3 beta 3) file, I attempt to assign the property to a nullable property:
private var clsAProperty : ClassA?
...
self.clsAProperty = SomeClass.someInstance().clsAProperty as ClassA?
This code is crashing with the following message:
Fatal Error: unexpectedly found nil while unwrapping an Optional value
Everything works as expected when compiled under Xcode 6.2.
Is this a bug, or am I missing anything? What optional is the runtime attempting to unwrap, when both are supposed to optional?