aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/Patterns.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-09-29 13:38:12 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-11 06:39:09 +0200
commitd68c106cc7fc23a5d7c2a25868278e6394601e5d (patch)
treef084f6f76b40a8b7f62cc46c817e4eed94ee9ca8 /tests/pos/Patterns.scala
parent5f04610ce923bf720fbdaf2408eca07412795fe3 (diff)
downloaddotty-d68c106cc7fc23a5d7c2a25868278e6394601e5d.tar.gz
dotty-d68c106cc7fc23a5d7c2a25868278e6394601e5d.tar.bz2
dotty-d68c106cc7fc23a5d7c2a25868278e6394601e5d.zip
Enable outer tests in pattern matcher.
And a test for this.
Diffstat (limited to 'tests/pos/Patterns.scala')
-rw-r--r--tests/pos/Patterns.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/Patterns.scala b/tests/pos/Patterns.scala
index 9a3811b3b..6df400f38 100644
--- a/tests/pos/Patterns.scala
+++ b/tests/pos/Patterns.scala
@@ -77,4 +77,16 @@ object Patterns {
}
case _ => ys.isEmpty
}
+
+ class A{
+ class B
+ }
+ val a1 = new A
+ val a2 = new A
+ d match {
+ case t: a1.B =>
+ t
+ case t: a2.B =>
+ t
+ }
}