diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug545.check | 7 | ||||
-rwxr-xr-x | test/files/neg/bug545.scala | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/bug545.check b/test/files/neg/bug545.check new file mode 100644 index 0000000000..e87cc1a817 --- /dev/null +++ b/test/files/neg/bug545.check @@ -0,0 +1,7 @@ +bug545.scala:4 error: value blah is not a member of Test.this.Foo + val x = foo.blah match {
+ ^ +bug545.scala:5 error: recursive value x needs type + case List(x) => x
+ ^ +two errors found diff --git a/test/files/neg/bug545.scala b/test/files/neg/bug545.scala new file mode 100755 index 0000000000..4063b71fd1 --- /dev/null +++ b/test/files/neg/bug545.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!") + } +}
\ No newline at end of file |