Files
swift-mirror/test/Interop/Cxx/namespace/import-as-member-module-interface.swift
Egor Zhdan e95f6a3ce9 [cxx-interop] Allow import-as-member for types in namespaces
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
2025-06-26 12:39:50 +01:00

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: }