Skip to content

Commit d4cab86

Browse files
committed
[SILGen]: [SILGen]: Add test for parenthesized try expression
1 parent f2c9393 commit d4cab86

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

test/SILGen/typed_throws.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,3 @@ class MySubclass: MyClass {
315315
class MySubsubclass: MySubclass {
316316
override func f() { }
317317
}
318-
319-
// Check that SILGen does not crash because of a parenthesized try expression
320-
class Class {
321-
var num: Int = 1
322-
323-
init() throws {}
324-
}
325-
_ = (try Class().num)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %target-swift-emit-silgen %s -verify
2+
3+
// Check that SILGen does not crash because of a parenthesized try expression
4+
class Class {
5+
var num: Int = 1
6+
7+
init() throws {}
8+
}
9+
_ = (try Class().num)

0 commit comments

Comments
 (0)