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
➜ snips scala-cli compile --server=false-S3.7.0-RC1--jvm 17 no-compiler.scala
-- [E177] ReferenceError:/home/amarki/snips/no-compiler.scala:5:2------------5|Compiler(42)
|^^^^^^^^|Reference to constructor proxy forclassCompiler| shadows outer reference to objectCompiler in packagejava.lang||The instance needs to be created with an explicit `new`.
|| longer explanation available when compiling with`-explain`1 error found
Compilation failed
Expectation
The API was deleted in modern JVMs, so this particular issue is resolved. However, we needn't be exposed to such brittleness.
-Yimports is too blunt an instrument.
It doesn't matter if I
importjava.lang.{Compileras_, *}
which is one of those clever Scala things which may or may not work. Maybe it would work for a Predef.
Maybe a directive could be used to unimport or shadow or otherwise specify a "profile" to compile against.
Compiler version
3.6.4
Minimized code
Output
Expectation
The API was deleted in modern JVMs, so this particular issue is resolved. However, we needn't be exposed to such brittleness.
-Yimports
is too blunt an instrument.It doesn't matter if I
which is one of those clever Scala things which may or may not work. Maybe it would work for a
Predef
.Maybe a directive could be used to unimport or shadow or otherwise specify a "profile" to compile against.
Noticed IRL at #17563 (comment)
The text was updated successfully, but these errors were encountered: