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
poor diagnostic error for using newly-generified Java class got even worse #8439
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8439?orig=1 |
@adriaanm said: |
@retronym said: |
@adriaanm said (edited on Mar 25, 2014 12:03:01 AM UTC): I've been poking around here a bit as well, which made me circle back to the hack in #4365. case PolyType(tparams, result) =>
val tparams1 = flipped(mapOver(tparams))
val result1 = this(result)
if ((tparams1 eq tparams) && (result1 eq result)) tp
else PolyType(tparams1, result1.substSym(tparams, tparams1)) The problem is that |
@retronym said: object Test {
val lv: scala.swing.ListView[Any] = ???
lv.peer.setModel(null)
} |
@retronym said: private def correspondingTypeArgument(lhs: Type, rhs: Type): Type = {
val TypeRef(_, lhsSym, lhsArgs) = lhs
val TypeRef(_, rhsSym, rhsArgs) = rhs
require(lhsSym.owner == rhsSym, s"$lhsSym is not a type parameter of $rhsSym")
// Find the type parameter position; we'll use the corresponding argument.
// Why are we checking by name rather than by equality? Because for
// reasons which aren't yet fully clear, we can arrive here holding a type
// parameter whose owner is rhsSym, and which shares the name of an actual
// type parameter of rhsSym, but which is not among the type parameters of
// rhsSym. One can see examples of it at SI-4365.
val argIndex = rhsSym.typeParams indexWhere (lhsSym.name == _.name)
// don't be too zealous with the exceptions, see #2641
if (argIndex < 0 && rhs.parents.exists(typeIsErroneous))
|
@gourlaysama said: object Test extends App {
val comboBox = new ComboBox(List(None))
comboBox.peer.setModel(new DefaultComboBoxModel())
} |
2.11.0-M1, amongst an projectile error:
2.11.0-M2:
2.11.0-M3
Minimization pending.
The text was updated successfully, but these errors were encountered: