mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fix @objcImpl subclass init visibility computation
When writing an @objc subclass of an @objcImplementation class, implicit initializers in the subclass were treated as overriding the *implementation decl*, not the *interface decl*, of the initializer in the superclass. This caused Swift to incorrectly compute the visibility of the superclass initializer and omit an `override` keyword from the module interface when one would definitely be necessary. Correct this oversight by looking up the interface decl matching the superclass implementation in `collectNonOveriddenSuperclassInits()`.
This commit is contained in:
@@ -74,7 +74,7 @@ open class SwiftSubclass: ImplClass {
|
||||
print("subclass mainMethod")
|
||||
}
|
||||
|
||||
// CHECK-DAG: @objc dynamic public init()
|
||||
// CHECK-DAG: @objc override dynamic public init()
|
||||
// CHECK-DAG: @objc deinit
|
||||
}
|
||||
// CHECK: }
|
||||
|
||||
Reference in New Issue
Block a user