We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
unused import
Scala 3.6.2 with scalacOptions "-Wunused:imports"
import scala.compiletime.deferred class Context trait Foo: given context: Context = deferred
Scala compiler returns a warning unused import import scala.compiletime.deferred
unused import import scala.compiletime.deferred
The incorrect warning results in misleading highlighting in IntelliJ IDEA when compiler-based highlighting is enabled
The compiler should not return an "unused import" warning for scala.compiletime.deferred, as it is clearly used in the code
scala.compiletime.deferred
The text was updated successfully, but these errors were encountered:
See #21805 which is an umbrella ticket for compiletime.
I'll work my way through the use cases, but I just pushed this one, thanks. In this case, I think it will not support name fidelity, e.g.,
import compiletime.deferred as dufuhhed
Edit: actually the warning would take the highest precedence import in any case.
But TIL:
|Note that `deferred` can only be used under its own name when implementing a given in a trait; `defuhhed` is not accepted.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Compiler version
Scala 3.6.2 with scalacOptions "-Wunused:imports"
Minimized code
Output
Scala compiler returns a warning
unused import import scala.compiletime.deferred
The incorrect warning results in misleading highlighting in IntelliJ IDEA when compiler-based highlighting is enabled
Expectation
The compiler should not return an "unused import" warning for
scala.compiletime.deferred
, as it is clearly used in the codeThe text was updated successfully, but these errors were encountered: