We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The smallest example I was able to distill involves a type lambda:
sealed trait Foo[F[_]] case class Bar[F[_]]() extends Foo[F] object Test { val foo: Foo[({ type Out[X] = String })#Out] = ??? foo match { case Bar() => // error: constructor cannot be instantiated to expected type // found : Bar[F] // required: Foo[[X]String] } }
It is reproducible also without type lambdas, but the example is slightly more involved (some simpler cases do work):
sealed trait Foo[F[_]] case class Bar[F[_]]() extends Foo[F] trait TC[A, B] { type F[X] = B } object TC { implicit val intInstance: TC[Int, String] = new TC[Int, String] {} implicit class Ops[A, B](a: A)(implicit val tc: TC[A, B]) { def getFoo: Foo[tc.F] = ??? } 1.getFoo match { case Bar() => // error: constructor cannot be instantiated to expected type // found : Bar[F] // required: Foo[[X]String] } }
In both cases, it seems it got the shape of type arguments right, but doesn't unify F[_] with [X]String.
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-10195?orig=1 Reporter: Tomas Mikula (tomas.mikula-at-gmail.com) Affected Versions: 2.12.1
Sorry, something went wrong.
Higher-kinded type variable unification.
b48bb2d
Can cause ambiguous implicits, so is under the compiler flag -Xsource:2.13 Fixes scala/bug#10185 Fixes scala/bug#10195 Fixes scala/bug#10197 Fixes scala/bug#10213 Fixes scala/bug#10238 Fixes scala/bug#10372 Presents an alternative fix to scala/bug#6895.
6a4e326
c6880e1
scala/scala@33478bd
adriaanm
No branches or pull requests
The smallest example I was able to distill involves a type lambda:
It is reproducible also without type lambdas, but the example is slightly more involved (some simpler cases do work):
In both cases, it seems it got the shape of type arguments right, but doesn't unify F[_] with [X]String.
The text was updated successfully, but these errors were encountered: