You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In merged PR #16157, -Wunused:locals-Wunused:privates only checks if the definitions are used (read).
As suggested in the mentioned PR, the idea would be to improve these warnings as in Scala 2 -Ywarn-unused:<args> and to track also whether vars are set or not, see this Scala 2 test example.
The text was updated successfully, but these errors were encountered:
…7160)
This PR is related to my Bachelor Semester Project, supervised by
@anatoliykmetyuk.
The latter consist in improving and implementing more Scala 3 linter
options (see #15503), with #16639 as a starting issue fixed in this PR.
- During the traversal in CheckUnused.scala (Miniphase & local
TreeTraverser), when reaching an `Assign` case, symbols are collected as
set, and then used to filter used locals and privates variable at
reporting time.
- Adapt test suit, and Add more test accordingly.
- Note that for a same variable the unused warning always has priority
and shadows the unset warning.
That feature follows the Scala 2 `-Ywarn-unused:<args>` behavior.
In merged PR #16157,
-Wunused:locals
-Wunused:privates
only checks if the definitions are used (read).As suggested in the mentioned PR, the idea would be to improve these warnings as in Scala 2
-Ywarn-unused:<args>
and to track also whethervar
s are set or not, see this Scala 2 test example.The text was updated successfully, but these errors were encountered: