aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/switch-small.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/switch-small.scala')
-rw-r--r--tests/untried/pos/switch-small.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/untried/pos/switch-small.scala b/tests/untried/pos/switch-small.scala
new file mode 100644
index 000000000..9de9ca028
--- /dev/null
+++ b/tests/untried/pos/switch-small.scala
@@ -0,0 +1,8 @@
+import annotation._
+
+object Test {
+ def f(x: Int) = (x: @switch) match {
+ case 1 => 1
+ case _ => 2
+ }
+}