File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
test/Interop/ObjCToSwiftToObjCxx Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,8 @@ class ModuleWriter {
596
596
else if (isa<StructDecl>(TD) && NTD->hasClangNode ())
597
597
emitReferencedClangTypeMetadata (NTD);
598
598
else if (const auto *cd = dyn_cast<ClassDecl>(TD))
599
- if (cd->isObjC () || cd->isForeignReferenceType ())
599
+ if ((cd->isObjC () && cd->getClangDecl ()) ||
600
+ cd->isForeignReferenceType ())
600
601
emitReferencedClangTypeMetadata (NTD);
601
602
} else if (auto TAD = dyn_cast<TypeAliasDecl>(TD)) {
602
603
if (TAD->hasClangNode ())
Original file line number Diff line number Diff line change @@ -88,10 +88,17 @@ public func retObjCClassArray() -> [ObjCKlass] {
88
88
return [ ]
89
89
}
90
90
91
+ public class KVOCookieMonster {
92
+ public static func += ( lhs: KVOCookieMonster , rhs: NSKeyValueObservation ) {
93
+ lhs. cookies. append ( rhs)
94
+ }
95
+
96
+ private var cookies = Array < NSKeyValueObservation > ( )
97
+ }
98
+
91
99
// CHECK: @interface HasBlockField : NSObject
92
100
// CHECK: @property (nonatomic, copy) void (^ _Nullable foo)(ObjCKlassState);
93
101
// CHECK: @end
94
-
95
102
// CHECK: SWIFT_EXTERN id <ObjCProtocol> _Nonnull $s9UseObjCTy03retB9CProtocolSo0bE0_pyF(void) SWIFT_NOEXCEPT SWIFT_CALL; // retObjCProtocol()
96
103
// CHECK-NEXT: #endif
97
104
// CHECK-NEXT: #if defined(__OBJC__)
You can’t perform that action at this time.
0 commit comments