File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,12 @@ class MyObject : NSObject {}
409
409
@objc @objcMembers class DeeperIn { }
410
410
}
411
411
412
+ // CHECK-LABEL: SWIFT_CLASS_NAMED("CustomNameInner")
413
+ // CHECK-NEXT: @interface MyInnerClass
414
+ // CHECK-NEXT: init
415
+ // CHECK-NEXT: @end
416
+ @objc ( MyInnerClass) @objcMembers class CustomNameInner { }
417
+
412
418
// CHECK-LABEL: @interface AnotherInner : A1
413
419
// CHECK-NEXT: init
414
420
// CHECK-NEXT: @end
Original file line number Diff line number Diff line change 14
14
// RUN: %FileCheck --check-prefix=NEGATIVE %s < %t/protocols.h
15
15
// RUN: %check-in-clang %t/protocols.h
16
16
17
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -I %t -emit-module -module-name protocols_nested -o %t %s -disable-objc-attr-requires-foundation-module -enable-experimental-feature NestedProtocols
18
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -I %t -parse-as-library %t/protocols_nested.swiftmodule -typecheck -emit-objc-header-path %t/protocols_nested.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module -enable-experimental-feature NestedProtocols
19
+ // RUN: %FileCheck --check-prefix=NESTED %s < %t/protocols_nested.h
20
+ // RUN: %check-in-clang %t/protocols_nested.h
21
+
17
22
// REQUIRES: objc_interop
18
23
19
24
import Foundation
@@ -137,6 +142,28 @@ extension NSString : A, ZZZ {}
137
142
@objc optional func f( )
138
143
}
139
144
145
+ #if $NestedProtocols
146
+ // NESTED-LABEL: @interface ParentClass
147
+ // NESTED-NEXT: @end
148
+ @objc class ParentClass {
149
+
150
+ // NESTED-LABEL: @protocol Nested
151
+ // NESTED-NEXT: @end
152
+ @objc protocol Nested { }
153
+
154
+ // NESTED-LABEL: SWIFT_PROTOCOL_NAMED("Nested2")
155
+ // NESTED-NEXT: @protocol NestedInParent
156
+ // NESTED-NEXT: @end
157
+ @objc ( NestedInParent) protocol Nested2 { }
158
+ }
159
+
160
+ extension ParentClass {
161
+ // NESTED-LABEL: @protocol NestedInExtensionOfParent
162
+ // NESTED-NEXT: @end
163
+ @objc protocol NestedInExtensionOfParent { }
164
+ }
165
+ #endif
166
+
140
167
// NEGATIVE-NOT: @protocol PrivateProto
141
168
@objc private protocol PrivateProto { }
142
169
You can’t perform that action at this time.
0 commit comments