I recently encountered a crash in our Swift code that was referencing an Objc class without any nullability annotations. The class was bridged to Swift with all properties as IUO e.g.:
@interface TestClass: NSObject @property (nonatomic) OtherClass *testProp; @end
// in Swift let cls = TestClass() let p = cls.testProp.otherProp // CRASH
I manually make testProp an optional to fix this:
let p = cls.testProp?.otherProp // OK
How can we get the compiler to either bridge un-annotated Objc code a nullable, or force the use of unwrapping? Our Objc is very big and there are probably hundreds of classes without nullability annotations, making it more dangerous to introduce Swift than stick with Objc.