You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Scala compiler is now constant-folding integer literals and our tests like 3.toInt don't warn anymore because the expression is already constant folded in the typer phase of the compiler after which scapegoat is invoked.
It's good that the compiler is now constant folding. We should adjust somehow.
The text was updated successfully, but these errors were encountered:
This is in typer, and the change for .toInt is a backport from Scala 3. // background
I've forgotten the details, but Scaladoc has a flag to reduce constant inlining for documentation purposes. Maybe something similar would be useful for 3rd party tooling?
For some reason, I've also forgotten the outcome of not changing trees for constant folding but only types. I've forgotten the context, maybe Scaladoc or maybe some other tool wanted to witness "the original tree".
See scala/community-build#1677.
The Scala compiler is now constant-folding integer literals and our tests like
3.toInt
don't warn anymore because the expression is already constant folded in thetyper
phase of the compiler after which scapegoat is invoked.It's good that the compiler is now constant folding. We should adjust somehow.
The text was updated successfully, but these errors were encountered: