-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: repo-valhalla
-
Component/s: tools
javac should issue an error for this code:
value class StrictAndLambda {
StrictAndLambda vil = null;
Runnable r = () -> { System.err.println(vil); };
public static void main(String... args) {}
}
instead it is being rejected by the verifier at execution time, the error should be the same as for code:
value class StrictAndLambda {
StrictAndLambda vil;
Runnable r;
StrictAndLambda() {
vil = null;
r = () -> { System.err.println(vil); };
super();
}
public static void main(String... args) {}
}
value class StrictAndLambda {
StrictAndLambda vil = null;
Runnable r = () -> { System.err.println(vil); };
public static void main(String... args) {}
}
instead it is being rejected by the verifier at execution time, the error should be the same as for code:
value class StrictAndLambda {
StrictAndLambda vil;
Runnable r;
StrictAndLambda() {
vil = null;
r = () -> { System.err.println(vil); };
super();
}
public static void main(String... args) {}
}