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
Regression in raw types handling #7482
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7482?orig=1 |
@retronym said: import scala.tools.partest.ReplTest
object Test extends ReplTest {
override def code = """
val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
val v: java.util.ArrayList[String] = new java.util.ArrayList[String](5)
"""
} On the compilation of the second line, the symbol for the constructor
Overload resolution discounts the Int-accepting constructor, and ends up reporting "found: Int, required: Collection". Here's a symptomatic fix: https://github.com/retronym/scala/compare/ticket/7482 I'm going to look a bit harder for the underlying problem, but if I can't find it, I think we should go with this fix for 2.11.0-M3. |
@retronym said: I still can't quite trace out why the old code was immune to this effect. But I can see a few ways that we can remedy this:
|
@paulp said: Forget win, isn't it necessary for correctness? The raw type IS the type after erasure. "Change modifyInfo (or make a variant) to be a no-op if the function doesn't transform the type." Huh, I could swear I did that long ago. Must have died in a branch. |
@paulp said: |
@paulp said: |
Caused by me in 9e101a3de8 .
The text was updated successfully, but these errors were encountered: