-
Notifications
You must be signed in to change notification settings - Fork 21
Spurious "cannot be checked at runtime" in latest 2.12.x (regression wrt. 2.12.8) #11534
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
It's 2 weeks before 2.12.9, but it doesn't look like there's an activity on this, so I am bumping this to 2.12.10. |
This is caused by one of the commits in scala/scala@8257b83...ae27fe9. With the parent merge commit (8257b83) the warning doesn't appear. @retronym |
Not a clue if that's the cause—or how it could possibly be the cause—but it seems that |
Here's a smaller repro: // scalac: -Xfatal-warnings -unchecked
object Test1 {
val g: scala.tools.nsc.Global = ???
import g._
def test(sym: Symbol) = sym.name match {
case _: TermName =>
}
}
Ideally the compiler would be smart enough to avoid the runtime test in this case as we statically know that the prefixes are the same. But |
This commit works around scala/bug#11534.
This commit works around scala/bug#11534.
Trying to build the latest 0.6.x branch of Scala.js with the latest 2.12.x, I get a warning that I do not get with 2.12.8.
Repro:
The line mentioned is here:
https://github.com/scala-js/scala-js/blob/fa02c745a64b869127b8cb68d594f5ca6c1b2d4e/compiler/src/main/scala/org/scalajs/core/compiler/GenJSCode.scala#L4421
The warning was not reported by 2.12.8.
Note that the next case with
JSBinaryOpMethodName
, which is extremely similar, does not emit a warning.A similar problem exists on our
master
branch (commit scala-js/scala-js@9f4f59b), where this becomes an error because we have-Xfatal-warnings
.The text was updated successfully, but these errors were encountered: