Files
swift-mirror/test/ClangImporter/MixedSource/Inputs/import-as-member-swift.h
Jordan Rose b00bc829f8 [ClangImporter] Fall back to Swift class names when resolving @class (#27921)
Christopher Rogers' (good) work in 49fd5acbb2 caught places where
the Swift compiler was allowing a @class to resolve to a Swift class
even if that class had a conflicting Objective-C name, or wasn't
intended to be exposed to Objective-C at all. Unfortunately, this
broke source compatibility in projects where people were relying on
this. Restore that functionality, but only as a fallback; matching the
Objective-C name is better than matching the Swift name.

rdar://problem/56681046
2019-10-29 09:50:49 -07:00

15 lines
360 B
Objective-C

@class Outer;
struct NestedInOuter {
int a;
} __attribute((swift_name("Outer.Nested")));
@class OuterByObjCName_ObjC;
struct NestedInOuterByObjCName {
int b;
} __attribute((swift_name("OuterByObjCName_ObjC.Nested")));
@class OuterBySwiftName_Swift;
struct NestedInOuterBySwiftName {
int c;
} __attribute((swift_name("OuterBySwiftName_Swift.Nested")));