Add the linter option -Wunused:patvars #16628
Labels
area:linting
Linting warnings enabled with -W or -Xlint
area:reporting
Error reporting including formatting, implicit suggestions, etc
itype:enhancement
In the (currently approved) PR #16157 (related to issue #15503), which add some linter options, it was decided not to add
-Wunused:patvars
yet, as it requires modifications to more phases of the compiler. Thus, it seems a better idea to handle it separately.The current replacement is
-Wunused:unsafe-warn-patvars
which doesn't support suppressing warnings (x @ _
), thus triggering false positive, i.e. in for expression.The issue is that it seems not possible to differentiate these cases, after desugaring :
TODO :
-Wunused:patvars
(which should also be triggered by-Wunused:all
)-Wunused:unsafe-warn-patvars
i15503*.scala
The text was updated successfully, but these errors were encountered: