Files
swift-mirror/test/Interop/Cxx/templates/class-template-variardic-parameter-module-interface.swift
Egor Zhdan d66c8edda2 [cxx-interop] Disambiguate template instantiations with parameter packs
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
2024-11-08 16:43:59 +00:00

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