eclipse-jdt / eclipse-jdt/eclipse.jdt.core

ECJ appears to forego many semantic checks for members of local anonymous classes

Open
#4,319 2 comments 0 reactions 1 assignee Claimed by @srikanth-sankaran View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.