-
Bug
-
Resolution: Fixed
-
P4
-
repo-valhalla
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) {}
}