summaryrefslogtreecommitdiff
path: root/test/files/run/t9349
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t9349')
-rw-r--r--test/files/run/t9349/data.scala1
-rw-r--r--test/files/run/t9349/test.scala21
2 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/t9349/data.scala b/test/files/run/t9349/data.scala
new file mode 100644
index 0000000000..f88a6cfaeb
--- /dev/null
+++ b/test/files/run/t9349/data.scala
@@ -0,0 +1 @@
+case class Outer(i: Int) { class Inner }
diff --git a/test/files/run/t9349/test.scala b/test/files/run/t9349/test.scala
new file mode 100644
index 0000000000..ebce4e77dd
--- /dev/null
+++ b/test/files/run/t9349/test.scala
@@ -0,0 +1,21 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ val o1 = Outer(5)
+ o1 match {
+ case o @ Outer(_) =>
+ val i = new o.Inner
+ }
+ o1 match {
+ case o : Outer =>
+ val i = new o.Inner
+
+ }
+ object Extractor {
+ def unapply(a: Any): Option[Outer] = Some(o1)
+ }
+ null match {
+ case Extractor(o2) =>
+ val i = new o2.Inner
+ }
+ }
+}