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 {
596596 else if (isa<StructDecl>(TD) && NTD->hasClangNode ())
597597 emitReferencedClangTypeMetadata (NTD);
598598 else if (const auto *cd = dyn_cast<ClassDecl>(TD))
599- if (cd->isObjC () || cd->isForeignReferenceType ())
599+ if ((cd->isObjC () && cd->getClangDecl ()) ||
600+ cd->isForeignReferenceType ())
600601 emitReferencedClangTypeMetadata (NTD);
601602 } else if (auto TAD = dyn_cast<TypeAliasDecl>(TD)) {
602603 if (TAD->hasClangNode ())
Original file line number Diff line number Diff line change @@ -88,10 +88,17 @@ public func retObjCClassArray() -> [ObjCKlass] {
8888 return [ ]
8989}
9090
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+
9199// CHECK: @interface HasBlockField : NSObject
92100// CHECK: @property (nonatomic, copy) void (^ _Nullable foo)(ObjCKlassState);
93101// CHECK: @end
94-
95102// CHECK: SWIFT_EXTERN id <ObjCProtocol> _Nonnull $s9UseObjCTy03retB9CProtocolSo0bE0_pyF(void) SWIFT_NOEXCEPT SWIFT_CALL; // retObjCProtocol()
96103// CHECK-NEXT: #endif
97104// CHECK-NEXT: #if defined(__OBJC__)
You can’t perform that action at this time.
0 commit comments