Skip to content

Commit b96a908

Browse files
committed
add test for partial function handler
1 parent bf37dce commit b96a908

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/run/rescue.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ import lib._
1010
assert((9 / 0 rescue 1) == 1)
1111
assert(((9 / 0 rescue { ex: NullPointerException => 5 }) rescue 10) == 10)
1212
assert(((9 / 0 rescue { ex: ArithmeticException => 5 }) rescue 10) == 5)
13+
14+
assert((9 / 0 rescue {
15+
case ex: NullPointerException => 4
16+
case ex: ArithmeticException => 3
17+
}) == 3)
1318
}

0 commit comments

Comments
 (0)