eclipse-jdt / eclipse-jdt/eclipse.jdt.core
ECJ appears to forego many semantic checks for members of local anonymous classes
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
Found while working on https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4290
This program which should be rejected is compiled by ECJ:
```
interface I {
}
public class X {
public Object a() {
return new Object() {
static class A implements I, I {}
};
}
}
```
This faulty behaviors has been there for a long time, I could verify it at 4.20 - but it likely dates back even earlier looking the git blame logs.
See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4290#issuecomment-3194719746
and https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4290#issuecomment-3194795382
Contributor guide
Assessment
This issue has not been assessed yet.