From a905d0e7e49bf92f119b2fdcd2b9d15b71d64ca2 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 18 Aug 2013 08:39:07 -0700 Subject: Revert "Minor improvement in pattern typer inference." This reverts commit 35122d6cda84bb2df69ca51c6b1b80e61693bf6f. It also includes a test case embodying the reversion reason: the test case no longer compiled. Parties interested in the surrounding details may want to look at SI-7472. --- test/files/pos/patmat-extract-tparam.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/files/pos/patmat-extract-tparam.scala (limited to 'test/files/pos') diff --git a/test/files/pos/patmat-extract-tparam.scala b/test/files/pos/patmat-extract-tparam.scala new file mode 100644 index 0000000000..6417b49c2b --- /dev/null +++ b/test/files/pos/patmat-extract-tparam.scala @@ -0,0 +1,13 @@ +trait Bip[T] { def h: T } +trait BoolBip extends Bip[Boolean] + +class A { + def g(x: Boolean): Unit = () + def f(xs: List[Bip[_]]) = xs foreach { case x: BoolBip => g(x.h) } +} + +class B { + def g(x: Boolean): Unit = () + def g(x: Int): Unit = () + def f(xs: List[Bip[_]]) = xs foreach { case x: BoolBip => g(x.h) } +} -- cgit v1.2.3