You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Creates a list of type disambiguation strings for the function return declaration fragments.
38
+
///
39
+
/// Unlike ``parameterTypeSpelling(for:isSwift:)``, this function splits Swift tuple return values is split into smaller disambiguation elements.
40
+
/// This makes it possible to disambiguate a `(Int, String)` return value using either `->(Int,_)`, `->(_,String)`, or `->(_,_)` (depending on the other overloads).
Unexpectedly found '\(String(cString:[accumulated[index],0]))' at \(index) which should be either an Array, Optional, or Dictionary marker in \(String(cString: accumulated+[0]))
207
+
Unexpectedly found '\(String(Unicode.Scalar(accumulated[index])))' at \(index) which should be either an Array, Optional, or Dictionary marker in \(String(decoding: accumulated, as:UTF8.self)))
assert(self[open]== openAngle,"Start marker at \(open) is '\(String(cString:[self[open],0]))' instead of '<' in \(String(cString:self+[0]))")
311
-
assert(self[close]== closeAngle,"End marker at \(close) is '\(String(cString:[self[close],0]))' instead of '>' in \(String(cString:self+[0]))")
348
+
assert(self[open]== openAngle,"Start marker at \(open) is '\(String(Unicode.Scalar(self[open])))' instead of '<' in \(String(decoding:self, as:UTF8.self))")
349
+
assert(self[close]== closeAngle,"End marker at \(close) is '\(String(Unicode.Scalar(self[close])))' instead of '>' in \(String(decoding:self, as:UTF8.self))")
312
350
313
351
// The caller accumulated a single character for each marker that indicated the type of syntactic sugar to apply.
assert(depth >=0,"Unexpectedly found more closing brackets than open brackets in \(String(cString:self[open +1..< close]+[0]))")
390
+
assert(depth >=0,"Unexpectedly found more closing brackets than open brackets in \(String(decoding:self[open +1..< close], as:UTF8.self))")
353
391
}
354
392
returnfalse // keep scanning
355
393
}
356
394
guardlet commaIndex =self[open +1 /* skip the known opening bracket */ ..< close /* skip the known closing bracket */].firstIndex(where: predicate)else{
357
-
assertionFailure("Didn't find ',' in \(String(cString:self[open +1..< close]+[0]))")
395
+
assertionFailure("Didn't find ',' in \(String(decoding:self[open +1..< close], as:UTF8.self))")
0 commit comments