mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #80000 from swiftlang/jgrynspan/145945680-mangledtypename-nonescapable
[Runtime] Allow ~Escapable types in _getMangledTypeName.
This commit is contained in:
@@ -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, *) {
|
||||
|
||||
Reference in New Issue
Block a user