mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This adds support for `swift_name` attribute being used with C++ types that are declared within namespaces, e.g.
```
__attribute__((swift_name("MyNamespace.MyType.my_method()")))
```
Previously import-as-member would only accept a top-level unqualified type name.
rdar://138934888
14 lines
584 B
Swift
14 lines
584 B
Swift
// RUN: %target-swift-ide-test -print-module -module-to-print=ImportAsMember -I %S/Inputs -source-filename=x -cxx-interoperability-mode=upcoming-swift | %FileCheck %s
|
|
|
|
// CHECK: extension MyNS.NestedStruct {
|
|
// CHECK-NEXT: func method() -> Int32
|
|
// CHECK-NEXT: func methodConstRef() -> Int32
|
|
// CHECK-NEXT: }
|
|
|
|
// CHECK: extension MyNS.MyDeepNS.DeepNestedStruct {
|
|
// CHECK-NEXT: func method() -> Int32
|
|
// CHECK-NEXT: func methodConstRef() -> Int32
|
|
// CHECK-NEXT: func methodTypedef() -> Int32
|
|
// CHECK-NEXT: func methodTypedefQualName() -> Int32
|
|
// CHECK-NEXT: }
|