aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2712-1.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-11 14:02:38 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 16:16:16 +0200
commita200695677237922fdf6f995c690cb0108ec2fc4 (patch)
tree5c596d3534f0ba8bf6a5c50daf5a3886eff71143 /tests/pos/t2712-1.scala
parent540b38cbd769cee3e8bc72530829e65f7e87cddb (diff)
downloaddotty-a200695677237922fdf6f995c690cb0108ec2fc4.tar.gz
dotty-a200695677237922fdf6f995c690cb0108ec2fc4.tar.bz2
dotty-a200695677237922fdf6f995c690cb0108ec2fc4.zip
Fix SI-2712
Allows partially instantiated types as type constrictors when inferring higher-kinded types.
Diffstat (limited to 'tests/pos/t2712-1.scala')
-rw-r--r--tests/pos/t2712-1.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pos/t2712-1.scala b/tests/pos/t2712-1.scala
new file mode 100644
index 000000000..4f84c9df5
--- /dev/null
+++ b/tests/pos/t2712-1.scala
@@ -0,0 +1,9 @@
+package test
+
+// Original test case from,
+//
+// https://issues.scala-lang.org/browse/SI-2712
+object Test {
+ def meh[M[_], A](x: M[A]): M[A] = x
+ meh{(x: Int) => x} // solves ?M = [X] Int => X and ?A = Int ...
+}