summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-13 20:50:58 +0000
committerPaul Phillips <paulp@improving.org>2011-10-13 20:50:58 +0000
commite3b58d0c993aa4be16214ce52aea5952a9e5f877 (patch)
treeaa33db4d4e14ce05867f7654eca0ca5d77cb12d7 /test/files
parent4f5159f0ed90598d1e5553afcce7ef2d1ff59d51 (diff)
downloadscala-e3b58d0c993aa4be16214ce52aea5952a9e5f877.tar.gz
scala-e3b58d0c993aa4be16214ce52aea5952a9e5f877.tar.bz2
scala-e3b58d0c993aa4be16214ce52aea5952a9e5f877.zip
Adjustment to @switch.
Don't require a tableswitch if the matcher elected not to emit one because there were so few cases. No review.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/switch-small.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/switch-small.scala b/test/files/pos/switch-small.scala
new file mode 100644
index 0000000000..9de9ca028e
--- /dev/null
+++ b/test/files/pos/switch-small.scala
@@ -0,0 +1,8 @@
+import annotation._
+
+object Test {
+ def f(x: Int) = (x: @switch) match {
+ case 1 => 1
+ case _ => 2
+ }
+}