mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add test case for apparently-fixed crasher
https://github.com/swiftlang/swift/issues/83011
This commit is contained in:
15
test/SILGen/typed_throws_async.swift
Normal file
15
test/SILGen/typed_throws_async.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
// RUN: %target-swift-emit-silgen %s
|
||||
|
||||
enum CustomError: Error {
|
||||
case error
|
||||
}
|
||||
|
||||
struct Test2<T> {
|
||||
init(_: T) async throws(CustomError) {}
|
||||
}
|
||||
|
||||
do {
|
||||
_ = try await Test2(1)
|
||||
} catch {
|
||||
print("\(error)")
|
||||
}
|
||||
Reference in New Issue
Block a user