[SR-11905] Objective-C interop allows creation of undefined behavior #54322
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
good first issue
Good for newcomers
Environment
Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)
Additional Detail from JIRA
md5: df1a976b8eb12c28ba3696248c7605f6
Issue Description:
In pure Swift this wouldn't be possible because we shouldn't be able to override a property of a class we import and don't own.
However due to Objective-C interop the swift compiler does not complain about this extension and let us create an undefined behavior at runtime.
Source: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
The text was updated successfully, but these errors were encountered: