mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/main' into bump-swift-version-to-6
This commit is contained in:
@@ -11,3 +11,15 @@ public enum MyError: Error {
|
||||
// CHECK-NEXT: public func throwsMyError() throws(Test.MyError)
|
||||
// CHECK-NEXT: #endif
|
||||
public func throwsMyError() throws(MyError) { }
|
||||
|
||||
// CHECK: #if compiler(>=5.3) && $TypedThrows
|
||||
// CHECK-NEXT: public func takesClosureThrowingMyError(_ closure: () throws(Test.MyError) -> Swift.Void)
|
||||
// CHECK-NEXT: #endif
|
||||
public func takesClosureThrowingMyError(_ closure: () throws(MyError) -> Void) {}
|
||||
|
||||
public struct HasThrowingInit {
|
||||
// CHECK: #if compiler(>=5.3) && $TypedThrows
|
||||
// CHECK-NEXT: public init() throws(Test.MyError)
|
||||
// CHECK-NEXT: #endif
|
||||
public init() throws(MyError) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user