summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/errorType.check3
-rw-r--r--test/files/neg/errorType.scala9
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/neg/errorType.check b/test/files/neg/errorType.check
new file mode 100644
index 0000000000..9818bf3bed
--- /dev/null
+++ b/test/files/neg/errorType.check
@@ -0,0 +1,3 @@
+errorType.scala:4 error: value blah is not a member of Test.this.Foo
+ val x = foo.blah match {
+ ^
diff --git a/test/files/neg/errorType.scala b/test/files/neg/errorType.scala
new file mode 100644
index 0000000000..f1f9909dcb
--- /dev/null
+++ b/test/files/neg/errorType.scala
@@ -0,0 +1,9 @@
+object Test {
+ class Foo
+ val foo = new Foo
+ val x = foo.blah match {
+ case List(x) => x
+ case Nil => null
+ case _ => throw new Error("too many!")
+ }
+}