Open scabug opened 10 years ago
Imported From: https://issues.scala-lang.org/browse/SI-7976?orig=1 Reporter: @xeno-by Affected Versions: 2.10.3, 2.11.0-M6
@Blaisorblade should we close as "unlikely to progress in Scala 2"?
it looks "easy" (yeah lol), it's fixed in Dotty, but if this is hard or typer is unsupported then OK.
let's see if anyone else comments. if not, we can close it in the next sweep.
I think we can make progress on inference bugs in Scala 2. I vote against closing this like this.
@milessabin sure, we can try not to be too trigger-happy with this this overall.
but, I'd prefer to focus on individual tickets, one at a time.
if you feel this bug in particular is both clear and actionable, can you comment with your summary of what you feel the underlying issue is and what you feel a solution might look like? because if we don't have that, the noise starts overwhelming the signal.
I have some ongoing work on improving the solver: https://github.com/scala/scala/pull/6127. This looks like the kind of thing it might pick up.
I believe this has more to do with the order in which parents of type refinements are checked for subtyping rather than the type variable solver itself. Note that with
is not true intersection in Scala 2. Similar to scala/scala#6257, moving type variables to the end might help, but this might also subtly change the meaning of with
.
Omitting the explicit type for c or qualifying the call to foo with an explicit type argument makes the code compile.