summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/unreachablechar.check4
-rw-r--r--test/files/neg/unreachablechar.scala8
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/neg/unreachablechar.check b/test/files/neg/unreachablechar.check
new file mode 100644
index 0000000000..7442e1178a
--- /dev/null
+++ b/test/files/neg/unreachablechar.check
@@ -0,0 +1,4 @@
+unreachablechar.scala:5: error: unreachable code
+ case 'f' => println("not stuff?");
+ ^
+one error found
diff --git a/test/files/neg/unreachablechar.scala b/test/files/neg/unreachablechar.scala
new file mode 100644
index 0000000000..94438ce321
--- /dev/null
+++ b/test/files/neg/unreachablechar.scala
@@ -0,0 +1,8 @@
+object Foo extends Application{
+ 'f' match {
+ case 'o'|'c'|'b' => println("Oooo");
+ case _ => println("stuff");
+ case 'f' => println("not stuff?");
+ }
+
+}