We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2431449 commit fa3c400Copy full SHA for fa3c400
tests/neg/t2712-8.scala
@@ -0,0 +1,10 @@
1
+object Test extends App {
2
+ class L[A]
3
+ class Quux0[B, CC[_]]
4
+ class Quux[C] extends Quux0[C, L]
5
+
6
+ def foo[D[_]](x: D[D[Boolean]]) = ???
7
+ def bar: Quux[Int] = ???
8
9
+ foo(bar) // error: Found: Test.Quux[Int] Required: D[D[Boolean]]
10
+}
tests/pos/t2712-2b.scala
@@ -0,0 +1,18 @@
+package test
+class X1
+class X2
+class X3
+trait One[A]
+trait Two[A, B]
+class Foo extends Two[X1, X2] with One[X3]
11
+object Test {
12
+ def test1[M[_], A](x: M[A]): M[A] = x
13
14
+ val foo = new Foo
15
16
+ test1(foo): One[X3] // fails in Scala 2 with partial unification enabled, works in Dotty
17
+ test1(foo): Two[X1, X2]
18
0 commit comments