mirror of
https://github.com/tiennm99/lombok.git
synced 2026-08-01 10:20:51 +00:00
* 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.
9 lines
147 B
Java
9 lines
147 B
Java
import lombok.var;
|
|
public class VarNullInit {
|
|
public VarNullInit() {
|
|
super();
|
|
}
|
|
void method() {
|
|
@var java.lang.Object x = null;
|
|
}
|
|
} |