[SR-11011] Swift/Objective-C bridging error involving overriding class variable declared in the superclass's extension #53401
Labels
accepts invalid
Bug: Accepts invalid
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
run-time crash
Bug → crash: Swift code crashed during execution
Environment
Playground in Xcode 11.0 beta 7 (11M392r)
Apple Swift version 5.1 (swiftlang-1100.0.270.6 clang-1100.0.32.1)
Target: x86_64-apple-darwin18.7.0
Additional Detail from JIRA
md5: f3fd041566fa2bdc563e72dc413bbf43
Issue Description:
The last line triggers a crash:
"libc++abi.dylib: terminating with uncaught exception of type NSException"
Inside of a class function/computed property,
self
andsuper
should refer to the type of the class/struct, so in this caseself.init
andsuper.init
should be equivalent toUIColor.init
. Moreover, trying out an equivalent code but using only pure Swift classes, it all works fine.The text was updated successfully, but these errors were encountered: