Release flag doesn't make compiler suggest correct completions #18726
Labels
area:presentation-compiler
Related to the presentation compiler module used by Metals and possibly other tools
itype:bug
Milestone
Compiler version
3.3.1
with
-release 8
Minimized code
Output
Compiler will suggest completions from the current JDK and not from the JDK API. If Metals is running on JDK 11 it will still suggest
repeat
method which only was added in JDK 11Expectation
This works in Scala 2, but I am not exactly sure what we would need to migrate. @SethTisue suggested this is connected to JRT.
The only thing I found that seemed related was https://github.com/scala/scala/blob/bf45e199e96383b96a6955520d7d2524c78e6e12/src/compiler/scala/tools/nsc/Global.scala#L149
So I guess the default classpath is replaced by the jrt one if release flag ispresent? This must already work to some extend in Dotty since that flag works reporting compilation errors.
The text was updated successfully, but these errors were encountered: