mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 12:15:00 +00:00
[var] various upgrades to var:
* var is promoted to the main package. * It is no longer an opt-in thing. * bug: var (unlike val) is allowed in old-style for loops, but if you multi-init: for (var i = 0, j="Foo";;), you now get an error that you can't do that. * tests both for the multi-for situation and the new main package variant.
This commit is contained in:
1 parent
55bcc142d0
commit
66469e04fe
32 files changed
+120
-48
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import lombok.var;
|
||||
public class VarWarning {
|
||||
public VarWarning() {
|
||||
super();
|
||||
}
|
||||
public void isOkay() {
|
||||
@var java.lang.String x = "Warning";
|
||||
x.toLowerCase();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user