diff options
Diffstat (limited to 'tests/pending/run/virtpatmat_switch.scala')
-rw-r--r-- | tests/pending/run/virtpatmat_switch.scala | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/pending/run/virtpatmat_switch.scala b/tests/pending/run/virtpatmat_switch.scala deleted file mode 100644 index 5cdf271d5..000000000 --- a/tests/pending/run/virtpatmat_switch.scala +++ /dev/null @@ -1,38 +0,0 @@ -object Test extends dotty.runtime.LegacyApp { - def intSwitch(x: Int) = x match { - case 0 => "zero" - case 1 => "one" - case _ => "many" - } - - println(intSwitch(0)) - println(intSwitch(1)) - println(intSwitch(10)) - - def charSwitch(x: Char) = x match { - case 'a' => "got a" - case 'b' => "got b" - case _ => "got some letter" - } - - def byteSwitch(x: Byte) = x match { - case 'a' => "got a" - case 'b' => "got b" - case _ => "got some letter" - } - - println(charSwitch('a')) - println(byteSwitch('b')) - println(charSwitch('z')) - - def implicitDefault(x: Int) = x match { - case 0 => 0 - } - - try { - implicitDefault(5) - } catch { - case e: MatchError => println(e) - } - -} |