-
Notifications
You must be signed in to change notification settings - Fork 1.1k
False positive warning: unused import with certain combination of generics #22971
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
Comments
This is due to caching the resolution of From the superclass context of A couple of notes to self or reminders: The trees don't distinguish whether the ident is due to implicit search or import. The comment at Scala 2 certainly transforms to a select:
or
This doesn't matter for Scala 2 Removing the |
Is there any plan to fix this and #22971 for 3.7.0 release? Both issues have PRs waiting for review. If this is not fixed, how can I make my project compile other than not using I did not find a way how to disable import warnings selectively, as I was not able to make Wconf match properly on the multiline message. |
@OndrejSpanel I think lint fixes will not be "backported" to the branch during RC at this point. Because it is "just a lint", the immediate issue is that Your other question about matching multiline messages will require some testing, but supposedly the Wconf expression is "just a regex". (Edit: the regex need match only a subsequence of the text, i.e., If you post your |
Compiler version
3.7.0-RC1
3.7.0-RC2
Minimized code
Compile with
-Wunused:imports
:Output
Expectation
The code does not compile without the import, the warning should not be printed.
Note
The warning goes away when you remove the line
class Thing extends Entity[Class]
.The text was updated successfully, but these errors were encountered: