aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t7294.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-08-24 15:06:30 +0200
committerMartin Odersky <odersky@gmail.com>2016-08-26 11:13:17 +0200
commitbdb425c57128c85fc3f7bd03b1906f55805d2194 (patch)
tree1144b1224b5e282c40085142c0b48808eb79008d /tests/pos/t7294.scala
parente1dc0b46a81a507ca040dca05a98f49fd6520d25 (diff)
downloaddotty-bdb425c57128c85fc3f7bd03b1906f55805d2194.tar.gz
dotty-bdb425c57128c85fc3f7bd03b1906f55805d2194.tar.bz2
dotty-bdb425c57128c85fc3f7bd03b1906f55805d2194.zip
Relax matching requirement in unApply
We now always widen selector type to the superclass if necessary, no matter whether the selector type refers to a trait or a proper class.
Diffstat (limited to 'tests/pos/t7294.scala')
-rw-r--r--tests/pos/t7294.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pos/t7294.scala b/tests/pos/t7294.scala
new file mode 100644
index 000000000..ccac2b140
--- /dev/null
+++ b/tests/pos/t7294.scala
@@ -0,0 +1,6 @@
+object Test {
+ // no fruitless warning as Tuple2 isn't (yet) final.
+ // The corresponding `neg` test will treat it as final
+ // for the purposes of these tests under -Xfuture.
+ (1, 2) match { case Seq() => 0; case _ => 1 }
+}