mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
15 lines
360 B
Objective-C
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")));
|