-
Notifications
You must be signed in to change notification settings - Fork 21
Puzzling linter message for private var that is never updated. #10282
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
Comments
The wording is inherited from I'm not sure that the equivalence of vars and get/setters isn't widely known, at least among Java refugees. But maybe it could say "synthetic setter |
Since it's normally observed only when calling from Java it's easy to forget. For me anyway. I never think about getters and setters for fields because there's no reason to think they're there. |
The browser tab just says, |
The runner concatenates -i files and -e expression to run the code as a script. The addition of -I broke detection of -i there, which is now fixed. In addition, allow explicit `-howtorun:repl` which is now useful for `-e`, so that REPL will handle `-i` and `-I` and then evalute the expression as usual (and as the `-help` text implies). Fixes: scala/bug#10282
That old reference was a typo... |
Uh oh!
There was an error while loading. Please reload this page.
If you create a class with a private var that is never updated you get a puzzling linter warning:
Since users don't typically know that getter/setter pairs are generated it might be more useful to say something like
private var x in class A is never updated and could be a val
, or similar.This is in 2.12.2 with
-Xlint
.The text was updated successfully, but these errors were encountered: