mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This makes sure that different template instantiations of `std::tuple` get distinct Swift type names.
Similar to aa6804a3.
This also refactors `swift::importer::printClassTemplateSpecializationName` to follow a proper visitor pattern for the C++ template arguments.
rdar://139435937
13 lines
857 B
Swift
13 lines
857 B
Swift
// RUN: %target-swift-ide-test -print-module -module-to-print=ClassTemplateVariadic -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
|
|
// RUN: %target-swift-ide-test -print-module -module-to-print=ClassTemplateVariadic -I %S/Inputs -source-filename=x -cxx-interoperability-mode=swift-6 | %FileCheck %s
|
|
// RUN: %target-swift-ide-test -print-module -module-to-print=ClassTemplateVariadic -I %S/Inputs -source-filename=x -cxx-interoperability-mode=upcoming-swift | %FileCheck %s
|
|
|
|
// CHECK: @available(*, unavailable
|
|
// CHECK: struct Tuple<Ts> {
|
|
// CHECK: }
|
|
|
|
// CHECK: typealias Single = Tuple<IntWrapper>
|
|
// CHECK: typealias Pair = Tuple<IntWrapper, IntWrapper>
|
|
// CHECK: typealias Triple = Tuple<IntWrapper, IntWrapper, IntWrapper>
|
|
// CHECK: typealias Nested = Tuple<Tuple<IntWrapper, IntWrapper>, Tuple<IntWrapper, IntWrapper>>
|