-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
False warning about unused import for local/relative import with Scala 3.3 #18366
Comments
Minimized repro: trait Builder {
def foo(): Unit
}
def repro =
val builder: Builder = ???
import builder.{foo => bar}
bar() |
I think this one can also be addressed by counting an import as used if some code refers to its imported symbols (under either name). Here, we would see a reference to It converts a false negative into a false positive (i.e. now we might fail to warn), but the false positive is a rare corner case, so is acceptable. |
Reopening as commits fixing it were reverted (causing nondeterministic failures in tests) |
Compiler version
3.3.0 & 3.3.1-RC4
Minimized code
See: https://github.com/ReactiveMongo/ReactiveMongo/blob/master/driver/src/main/scala/api/Collation.scala#L166
Output
Expectation
No warning
The text was updated successfully, but these errors were encountered: