aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1269.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-17 18:29:30 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-17 20:02:50 +0200
commit3c3b32346f2c4eafe26cc9659b41ae50b0316b92 (patch)
treee655126228eac24372ed5a57a569f1a5ee8597d4 /tests/pos/i1269.scala
parent6e723202409d69cd6e6399d58a9d4fb7b2b337d4 (diff)
downloaddotty-3c3b32346f2c4eafe26cc9659b41ae50b0316b92.tar.gz
dotty-3c3b32346f2c4eafe26cc9659b41ae50b0316b92.tar.bz2
dotty-3c3b32346f2c4eafe26cc9659b41ae50b0316b92.zip
Fix outer test in pattern matcher
Previous test did not reflect deeper paths for outer references. This caused a -Ycheck:patMat failure for i1269.scala.
Diffstat (limited to 'tests/pos/i1269.scala')
-rw-r--r--tests/pos/i1269.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos/i1269.scala b/tests/pos/i1269.scala
new file mode 100644
index 000000000..c0b56e1ea
--- /dev/null
+++ b/tests/pos/i1269.scala
@@ -0,0 +1,16 @@
+trait Module {
+ sealed abstract class Tree
+
+ case class LetL() extends Tree
+
+ object O {
+ case class LetR() extends Tree
+ }
+}
+
+class Patmat(val module: Module) {
+ def patmat(tree: module.Tree) = tree match {
+ case module.LetL() =>
+ case module.O.LetR() =>
+ }
+}