eclipse-jdt / eclipse-jdt/eclipse.jdt.core
ASTParser cannot recover this statement that SelectionParser can
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
For `ResolveTests1_5.testBrokenSwitch0` and `ResolveTests1_5.testBrokenSwitch1`, the SelectionParser is able to recover the statements in the method, but the AssistParser isn't. It would be nice to move the hacks from the SelectionParser to the AssistParser so that ASTs created through ASTParser can access the recovered statements.
Here is the class used in the first test case; the second test case is similar.
```java
public class Test {
private static ILog test() {
return new ILog() {
@Override
public void log(String status) {
switch (status.length()) { // here
case
}
}
};
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.