From a16a635b647bb1cdb0759ab4ba1e794ec56d8081 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 15 Aug 2014 16:59:59 +1000 Subject: SI-8793 Fix patmat regression with extractors, existentials In the same vein as SI-8128 / 3e9e2c65a, revert to the 2.10.x style of determining the types of the product elements of an extractor when using `TupleN`. I believe we can discard the special casing for Option/Tuple/Seq altogether with judicious application of `repackExistential` in `unapplyMethodTypes`. That ought to also fix fix SI-8149. But I'll target that work at 2.12.x. --- test/files/pos/t8793.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/files/pos/t8793.scala (limited to 'test') diff --git a/test/files/pos/t8793.scala b/test/files/pos/t8793.scala new file mode 100644 index 0000000000..1276155675 --- /dev/null +++ b/test/files/pos/t8793.scala @@ -0,0 +1,15 @@ +package regr + +trait F[A] + +class G(val a: F[_], val b: F[_]) + +object G { + def unapply(g: G) = Option((g.a, g.b)) +} + +object H { + def unapply(g: G) = g match { + case G(a, _) => Option(a) + } +} -- cgit v1.2.3