-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ClassCastException in OrderingConstraint.nonParamBounds #4720
New issue
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
Comments
We just got a new report on Gitter, so I took a look. IIUC from the code, when starting type inference for the call to But here type inference finishes earlier than expected: it processes package <empty> {
final lazy module val Test: Test$ = new Test$()
final module class Test$() extends Object() { this: Test.type =>
def main(args: Array[String]): Unit = Test.m[Int, Int, Int](1)
def m[Y >: Nothing <: Int, Z >: Int <: Any, W >: Z <: Y](d: Y): Unit =
{
()
}
}
} It seems #4721 is similar, but there we find a problem because there's no solution for |
Fix regression in eeb5965. A type variable can already be solved in addToConstraint, so don't assume it is unsolved (hence its constraint entry is a TypeBounds) when first processing it. Fix scala#4720.
Fix regression in eeb5965. A type variable can already be solved in addToConstraint, so don't assume it is unsolved (hence its constraint entry is a TypeBounds) when first processing it. Fix scala#4720.
Be more defensive to handle other issues such as scala#4720 (comment). Code that needs to access the actual entry can call `entry` or `contains` instead.
Seems to work in release 0.8.0, crash in master:
cce.scala:
dotc cce.scala:
The text was updated successfully, but these errors were encountered: