We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea6b69e commit 34b6e4fCopy full SHA for 34b6e4f
stdlib/public/core/Misc.swift
@@ -92,8 +92,12 @@ func _mangledTypeName<T>(_ type: T.Type) -> String? {
92
return nil
93
}
94
95
- return String._fromUTF8Repairing(
96
- UnsafeBufferPointer(start: stringPtr, count: count)).0
+ let (result, repairsMade) = String._fromUTF8Repairing(
+ UnsafeBufferPointer(start: stringPtr, count: count))
97
+
98
+ precondition(!repairsMade, "repairs made to _mangledTypeName, this is not expected since names should always valid UTF-8")
99
100
+ return result
101
102
103
/// Lookup a class given a name. Until the demangled encoding of type
0 commit comments