We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.7
//> using options -Vprint:typer -Wunused:all class C { def f: Runnable = new Runnable { def run() = () def g = 42 } }
Dotty is silent but Scala 2 says
unused-priv.scala:7: warning: private method g in <$anon: Runnable> is never used def g = 42 ^
because the method is made private.
A warning that the method is unused (because effectively private if not actually).
Note that the inferred type in Scala 2 is the refinement. An expected type is required for the behavior.
As noticed by tpolecat https://mastodon.social/@tpolecat/114078274060499612
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Compiler version
3.7
Minimized code
Output
Dotty is silent but Scala 2 says
because the method is made private.
Expectation
A warning that the method is unused (because effectively private if not actually).
Note that the inferred type in Scala 2 is the refinement. An expected type is required for the behavior.
As noticed by tpolecat https://mastodon.social/@tpolecat/114078274060499612
The text was updated successfully, but these errors were encountered: