NFC: Add a test that exercises subclassing an Obj-C subclass of NSObject and verifies the printed members of the Swift subclass when emitting a module interface for a module containing the Swift subclass. Also verifies that NS_SWIFT_UNAVAILABLE initializers are omitted from the emitted interface.

This commit is contained in:
Allan Shortlidge
2022-04-19 15:01:59 -07:00
parent 4184a0bb57
commit a074d1e938
3 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -I %S/Inputs/inherited-objc-initializers/
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -I %S/Inputs/inherited-objc-initializers/
// RUN: %FileCheck %s < %t.swiftinterface
// REQUIRES: objc_interop
import InheritedObjCInits
// CHECK: @objc @_inheritsConvenienceInitializers public class Subclass : InheritedObjCInits.FrameworkObject {
public class Subclass: FrameworkObject {
// CHECK-NEXT: @objc override dynamic public init(selector: ObjectiveC.Selector)
// CHECK-NEXT: @objc override dynamic public init(integer: Swift.Int)
// CHECK-NEXT: @objc override dynamic public init()
// CHECK-NEXT: @objc deinit
} // CHECK-NEXT:{{^}$}}