Skip to content

Commit 64a0fe1

Browse files
committed
Avoid use of typed throws in SIL opaque values test
SIL opaque values do not yet support typed throws, so avoid the API that uses them.
1 parent 0e67e9a commit 64a0fe1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/SILGen/opaque_values_silgen.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,16 @@ public struct EnumSeq<Base : Seq> : Seq {
365365
}
366366

367367
extension Collection {
368+
func myMap<T>(_ body: (Element) -> T) -> [T] {
369+
var result = [T]()
370+
for element in self {
371+
result.append(body(element))
372+
}
373+
return result
374+
}
375+
368376
func transformEachElement<U>(_ cl: (Element) -> U) -> [U] {
369-
return map(cl)
377+
return myMap(cl)
370378
}
371379
}
372380

0 commit comments

Comments
 (0)