Skip to content

Commit c98aa53

Browse files
authored
Merge pull request #83062 from slavapestov/test-issue-83011
Add test case for apparently-fixed crasher
2 parents 412c4b1 + 9ab2800 commit c98aa53

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)