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 the scope of my Bachelor Project supervised by @anatoliykmetyuk,
I would like 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 ) :
classBase(varx:Int):defincrement() =
x = x +1classDerived(x : Int) extendsBase(x):overridedeftoString=
x.toString
valderived=newDerived(1)
println(derived.toString) // yields '1', as expected
derived.increment()
println(derived.toString) // still '1', probably unexpected
The text was updated successfully, but these errors were encountered:
schuetzcarl
changed the title
New linter option : -Wprivate-shadow
New linter option : -Xlint:private-shadow
Apr 4, 2023
ckipp01
transferred this issue from lampepfl/dotty-feature-requests
May 31, 2023
In the scope of my Bachelor Project supervised by @anatoliykmetyuk,
I would like 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: