eclipse-jdt / eclipse-jdt/eclipse.jdt.core
interface completion tries to import top level type from same class
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
Open completion at the `|` and accept the `ChildInterface` completion:
```java
public class TestImport implements | {
}
interface TopLevelInterface {
interface ChildInterface {
}
}
```
The result is
```java
import TopLevelInterface.ChildInterface;
public class TestImport implements ChildInterface {
}
interface TopLevelInterface {
interface ChildInterface {
}
}
```
This makes no sense, since you can't import types from the default package, and the type is in the current compilation unit. The correct completion should be:
```java
public class TestImport implements TopLevelInterface.ChildInterface {
}
interface TopLevelInterface {
interface ChildInterface {
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.