eclipse-jdt / eclipse-jdt/eclipse.jdt.core
ECJ fails to complain about a flexible constructor failing to initialize a blank final variable.
Open
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
4.40, 4.41 M2 and master/HEAD all compile the following illegal program:
```
public class X {
final String s;
X(String s0) {
s = s0;
super();
}
X() {
System.out.println("Blah");
super();
}
public static void main(String... args) {
System.out.print(new X("OK").s);
}
}
```
Javac 26 and 28 EA versions correctly reject this with: `X.java:12: error: variable s might not have been initialized`
Note: both constructors are required to reproduce the problem.
Contributor guide
Assessment
This issue has not been assessed yet.