We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
public class A { public String foo = "A"; }
class B extends A { override val foo: String = "B" }
This should not compile, because Java fields are in fact not overridable. Scala 2 realizes that and emits a (confusing) error at refchecks:
try/B.scala:2: error: incompatible type in overriding var foo: String (defined in class JA); found : String required: String override val foo: String = "B" ^
but dotty doesn't.
The text was updated successfully, but these errors were encountered:
@bishabosha I'm not planning to work on this for now.
Sorry, something went wrong.
945b31e
Merge pull request #9126 from dotty-staging/fx-#9115
f26ff0f
Fix #9115: Make Java-defined fields effectively final
odersky
No branches or pull requests
This should not compile, because Java fields are in fact not overridable. Scala 2 realizes that and emits a (confusing) error at refchecks:
but dotty doesn't.
The text was updated successfully, but these errors were encountered: