summaryrefslogtreecommitdiff
path: root/test/files/run/t6011b.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t6011b.scala')
-rw-r--r--test/files/run/t6011b.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t6011b.scala b/test/files/run/t6011b.scala
new file mode 100644
index 0000000000..3d405e0705
--- /dev/null
+++ b/test/files/run/t6011b.scala
@@ -0,0 +1,11 @@
+object Test extends App {
+ var cond = true
+
+ // should not generate a switch
+ def f(ch: Char): Int = ch match {
+ case 'a' if cond => 1
+ case 'z' | 'a' => 2
+ }
+
+ println(f('a') + f('z')) // 3
+} \ No newline at end of file