-
Notifications
You must be signed in to change notification settings - Fork 21
-Wunused:params
gives false negatives when implementing abstract method
#12733
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
-Wunused:params
gives false negatives when override
is missing-Wunused:params
gives false negatives when implementing abstract method
A strange wrinkle here is that Scala 3 only issues the warning if the |
In scala/scala#10305 I added In this case, the heuristic is don't warn when the param is required by a superinterface. As usual, some people prefer "strict" for "always warn me, it's never OK even for trivial methods". I have not kept all my fan mail to actually count the votes for which heuristics are most favored. So the new option returns the power to the people. Another heuristic is for |
ah, interesting. okay, maybe that one will land at some point |
I guess the only thing I need to report to the Scala 3 folks is the presence or absence of |
I recently learned that |
Scala 3 stopped warning sometime between 3.3.0-RC3 and 3.3.0-RC4:
and intentionally so, judging from the discussion on scala/scala3#17185 |
so arguably this ticket could be closed, since Scala 2 is now in line with Scala 3 here. as you see fit, @som-snytt |
Since Scala 3 has caught up with Scala 2, I'll close the ticket. The behavior is intended -- don't warn about param required by inherited signature -- but the caveats to ticket closure are that it's a dumb heuristic because |
with this code:
we see:
It seems to me that Scala 3 is correct to warn here and Scala 2 is mistaken not to.
This isn't contrived code; this is minimized from my attempt to enable Scala 3's unused warnings over in scala/scala-parser-combinators.
Vaguely in the same area: #11343.
@som-snytt this will interest you, I think.
The text was updated successfully, but these errors were encountered: