aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/lookupswitch.scala
diff options
context:
space:
mode:
authorSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
commit9ef5f6817688f814a3450126aa7383b0928e80a0 (patch)
tree5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/pos/lookupswitch.scala
parent194be919664447631ba55446eb4874979c908d27 (diff)
downloaddotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/pos/lookupswitch.scala')
-rw-r--r--tests/untried/pos/lookupswitch.scala36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/untried/pos/lookupswitch.scala b/tests/untried/pos/lookupswitch.scala
new file mode 100644
index 000000000..5d4825124
--- /dev/null
+++ b/tests/untried/pos/lookupswitch.scala
@@ -0,0 +1,36 @@
+// There's not a real test here, but on compilation the
+// switch should have the cases arranged in order from 1-30.
+class A {
+ def f(x: Int) = x match {
+ case 6 => "6"
+ case 18 => "18"
+ case 7 => "7"
+ case 2 => "2"
+ case 13 => "13"
+ case 11 => "11"
+ case 26 => "26"
+ case 27 => "27"
+ case 29 => "29"
+ case 25 => "25"
+ case 9 => "9"
+ case 17 => "17"
+ case 16 => "16"
+ case 1 => "1"
+ case 30 => "30"
+ case 15 => "15"
+ case 22 => "22"
+ case 19 => "19"
+ case 23 => "23"
+ case 8 => "8"
+ case 28 => "28"
+ case 5 => "5"
+ case 12 => "12"
+ case 10 => "10"
+ case 21 => "21"
+ case 24 => "24"
+ case 4 => "4"
+ case 14 => "14"
+ case 3 => "3"
+ case 20 => "20"
+ }
+}