Skip to content

Commit 5483861

Browse files
committed
Merge pull request scala#2217 from JamesIry/master_7006b
SI-7006 Fix the unreachable test
2 parents 14d51f4 + 9f6b7bc commit 5483861

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/files/run/unreachable.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ object Test extends App {
9393
x match {
9494
case 0 => return 0
9595
case 1 => return 1
96-
case _ => error("wtf")
96+
case -1 => return 2
9797
}
98-
2
98+
3
9999
}
100100

101101
def unreachableAfterSwitch: Int = {
102102
val x = util.Random.nextInt % 2
103103
x match {
104104
case 0 => return 42
105105
case 1 => return 41 + x
106-
case _ => error("wtf")
106+
case -1 => return 43 + x
107107
}
108108
2
109109
}

0 commit comments

Comments
 (0)