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
class LambdasAndImplicits { class MA[M[_], A](ma: M[A]) { def sheep = ma + " bee" } implicit def asMA[M[_], A](ma: M[A]) = new MA[M, A](ma) // Fails as expected: // (Right(1): Either[String, Int]).sheep // The two types are equal type Maybe[A] = Either[String, A] type MaybeLambda[A] = ({type l[x] = Either[String, x]})#l[A] val a = (Right(1).asInstanceOf[Maybe[Int]]).sheep val b = (Right(1).asInstanceOf[MaybeLambda[Int]]).sheep // Fails unexpectedly val c = (Right(1).asInstanceOf[({type l[x] = Either[String, x]})#l[Int]]).sheep }
I would expect b and c to evaluate to the same result, however there seems to be some difference in handling a type alias and a type lambda?
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-5993?orig=1 Reporter: Robin Palotai (ron) Affected Versions: 2.9.2
Sorry, something went wrong.
@adriaanm said: this is a limitation of type constructor inference
No branches or pull requests
I would expect b and c to evaluate to the same result, however there seems to be some difference in handling a type alias and a type lambda?
The text was updated successfully, but these errors were encountered: