Skip to content

Commit bffcd4b

Browse files
committed
Test cases
1 parent 7fc028c commit bffcd4b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/IRGen/typed_throws.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK
66

7+
// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-library-evolution
8+
79
// XFAIL: CPU=arm64e
810
// REQUIRES: PTRSIZE=64
911

@@ -216,3 +218,17 @@ func mayThrowEmptyErrorAsync(x: Bool) async throws(EmptyError) -> String? {
216218

217219
return ""
218220
}
221+
222+
223+
enum SP: Error {
224+
case a
225+
case b(Int32)
226+
}
227+
228+
protocol Proto {
229+
// This used to crash.
230+
static func f() throws(SP) -> Self
231+
232+
// This used to crash.
233+
static func f2() throws(SP) -> Int64
234+
}

0 commit comments

Comments
 (0)