Skip to content
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

Spurious "cannot be checked at runtime" in latest 2.12.x (regression wrt. 2.12.8) #11534

Open
sjrd opened this issue May 15, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@sjrd
Copy link
Member

commented May 15, 2019

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:

$ git clone git@github.com:scala-js/scala-js.git
$ cd scala-js
$ git checkout fa02c74
$ sbt
> set resolvers in Global += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
> ++2.12.9-bin-ae27fe9
> compiler/compile
[...]
[warn] compiler/src/main/scala/org/scalajs/core/compiler/GenJSCode.scala:4421: The outer reference in this type test cannot be checked at run time.
[warn]         case JSUnaryOpMethodName(code) if argc == 0 =>
[warn]                                 ^

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.

@dwijnand dwijnand added this to the 2.12.9 milestone May 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.