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 @@ -580,7 +580,8 @@ class ModuleWriter {
580
580
else if (isa<StructDecl>(TD) && NTD->hasClangNode ())
581
581
emitReferencedClangTypeMetadata (NTD);
582
582
else if (const auto *cd = dyn_cast<ClassDecl>(TD))
583
- if (cd->isObjC () || cd->isForeignReferenceType ())
583
+ if ((cd->isObjC () && cd->getClangDecl ()) ||
584
+ cd->isForeignReferenceType ())
584
585
emitReferencedClangTypeMetadata (NTD);
585
586
} else if (auto TAD = dyn_cast<TypeAliasDecl>(TD)) {
586
587
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