-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Suppress spurious Suppression #22383
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
Conversation
By making it a case class so toString is useful, I can tell that not all the suppressions were the same. Here it's visible that
In fact the duplication is because it sticks to everything:
Does this make the annotation useless? Well, check unused does say that a param is used iff its param accessor is used. Both should warn or neither; similarly for modules in whatever you call their dual nature. Normally, the "duplicate" warning would be ignored at the same position, assuming the message text also aligns. But that is nonsense. The sensible way is to ignore duplicate nowarns with equal |
04d695e
to
1bf2dfa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good! Thanks!
Guard against multiple registrations of nowarn on related elements. Fixes scala#18341
Guard against multiple registrations of nowarn on related elements. Fixes scala#18341 [Cherry-picked a377c8a][modified]
Guard against multiple registrations of nowarn on related elements.
Fixes #18341