aboutsummaryrefslogtreecommitdiff
path: root/tests/run/outerPatternMatch
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/outerPatternMatch')
-rw-r--r--tests/run/outerPatternMatch/Outer_1.scala6
-rw-r--r--tests/run/outerPatternMatch/Test_2.scala14
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/run/outerPatternMatch/Outer_1.scala b/tests/run/outerPatternMatch/Outer_1.scala
new file mode 100644
index 000000000..c3b102323
--- /dev/null
+++ b/tests/run/outerPatternMatch/Outer_1.scala
@@ -0,0 +1,6 @@
+class Outer {
+
+ class Inner
+
+}
+
diff --git a/tests/run/outerPatternMatch/Test_2.scala b/tests/run/outerPatternMatch/Test_2.scala
new file mode 100644
index 000000000..e46f52f20
--- /dev/null
+++ b/tests/run/outerPatternMatch/Test_2.scala
@@ -0,0 +1,14 @@
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ val x = new Outer
+ val y = new Outer
+ val i = new x.Inner
+ val j = new y.Inner
+ i match {
+ case _: y.Inner => assert(false)
+ case _: x.Inner => // OK
+ }
+ }
+
+}