Skip to content

Commit 9ab2800

Browse files
committed
Add test case for apparently-fixed crasher
#83011
1 parent a4ad806 commit 9ab2800

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/SILGen/typed_throws_async.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %target-swift-emit-silgen %s
2+
3+
enum CustomError: Error {
4+
case error
5+
}
6+
7+
struct Test2<T> {
8+
init(_: T) async throws(CustomError) {}
9+
}
10+
11+
do {
12+
_ = try await Test2(1)
13+
} catch {
14+
print("\(error)")
15+
}

0 commit comments

Comments
 (0)