-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New linter option : -Xlint:private-shadow #17612
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
Labels
Comments
schuetzcarl
added a commit
to schuetzcarl/dotty
that referenced
this issue
May 30, 2023
Respectively warn about : - a private field or a class parameter that shadows a superclass field - a local type parameter that shadows a type already in the scope Fixes : scala#17612 and scala#17613
schuetzcarl
added a commit
to schuetzcarl/dotty
that referenced
this issue
May 30, 2023
Respectively warn about : - a private field or a class parameter that shadows a superclass field - a local type parameter that shadows a type already in the scope Fixes : scala#17612 and scala#17613
szymon-rd
added a commit
that referenced
this issue
Sep 29, 2023
Implemented two additional lint warnings for my bachelor project supervised by @anatoliykmetyuk. Most of the work has been done in a new `MiniPhase` class called `CheckShadowing` and running in the same mega phase as the `CheckUnused.PostTyper` mini phase. They respectively warn about : - A private field or a class parameter that shadows a super-class field. - A type parameter that shadows a type already defined in the scope. Some examples can be seen in #17612 and #17613.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
For the scope of my Bachelor Project supervised by @anatoliykmetyuk,
we planned to add for dotty an equivalent lint warning as the
-Xlint:private-shadow
of Scala 2.It would warn about a private field or a class parameter that shadows a superclass field.
Here is a more concrete example from the Scala 2 issue ( scala/bug#4762 ) :
The text was updated successfully, but these errors were encountered: