summaryrefslogtreecommitdiff
path: root/test/files/pos/patmat-extract-tparam.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-08-18 08:39:07 -0700
committerPaul Phillips <paulp@improving.org>2013-08-18 08:43:38 -0700
commita905d0e7e49bf92f119b2fdcd2b9d15b71d64ca2 (patch)
tree86689f3f5ef9d0ffd34c6710d4012c16fd923094 /test/files/pos/patmat-extract-tparam.scala
parenta9efda40ee30796d3458604869a87a2c91f3efbf (diff)
downloadscala-a905d0e7e49bf92f119b2fdcd2b9d15b71d64ca2.tar.gz
scala-a905d0e7e49bf92f119b2fdcd2b9d15b71d64ca2.tar.bz2
scala-a905d0e7e49bf92f119b2fdcd2b9d15b71d64ca2.zip
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.
Diffstat (limited to 'test/files/pos/patmat-extract-tparam.scala')
-rw-r--r--test/files/pos/patmat-extract-tparam.scala13
1 files changed, 13 insertions, 0 deletions
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) }
+}