Merge pull request #80000 from swiftlang/jgrynspan/145945680-mangledtypename-nonescapable

[Runtime] Allow ~Escapable types in _getMangledTypeName.
This commit is contained in:
Mike Ash
2025-03-14 11:53:12 -04:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -494,6 +494,7 @@ DemangleToMetadataTests.test("Nested types in same-type-constrained extensions")
}
struct NonCopyable: ~Copyable {}
struct NonEscapable: ~Escapable {}
if #available(SwiftStdlib 5.3, *) {
DemangleToMetadataTests.test("Round-trip with _mangledTypeName and _typeByName") {
@@ -531,6 +532,11 @@ if #available(SwiftStdlib 5.3, *) {
let type: any ~Copyable.Type = NonCopyable.self
expectEqual("4main11NonCopyableV", _mangledTypeName(type))
}
DemangleToMetadataTests.test("Check _MangledTypeName with any ~Escapable.Type") {
let type: any ~Escapable.Type = NonEscapable.self
expectEqual("4main12NonEscapableV", _mangledTypeName(type))
}
}
if #available(SwiftStdlib 5.1, *) {