summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t4425.check4
-rw-r--r--test/files/neg/t4425.scala4
-rw-r--r--test/files/pos/t4524.scala9
3 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/t4425.check b/test/files/neg/t4425.check
new file mode 100644
index 0000000000..4ff4b1eec0
--- /dev/null
+++ b/test/files/neg/t4425.check
@@ -0,0 +1,4 @@
+t4425.scala:3: error: erroneous or inaccessible type
+ 42 match { case _ X _ => () }
+ ^
+one error found
diff --git a/test/files/neg/t4425.scala b/test/files/neg/t4425.scala
new file mode 100644
index 0000000000..d8cc6922f7
--- /dev/null
+++ b/test/files/neg/t4425.scala
@@ -0,0 +1,4 @@
+object Foo {
+ object X { def unapply(x : Int)(y : Option[Int] = None) = None }
+ 42 match { case _ X _ => () }
+}
diff --git a/test/files/pos/t4524.scala b/test/files/pos/t4524.scala
new file mode 100644
index 0000000000..4721a7d067
--- /dev/null
+++ b/test/files/pos/t4524.scala
@@ -0,0 +1,9 @@
+object test {
+ import A._
+ class A(b: B = new A.B())
+ object A {
+ class B
+ new A()
+ }
+}
+