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

Indirectly required type compile error only seen during incremental compile

Open
#4,747 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

To reproduce:

1. Start Eclipse in a new workspace.
2. Import projects from attached archive: [CompilerBug.zip](https://github.com/user-attachments/files/24649527/CompilerBug.zip)
3. Do a clean build for the workspace. Observe no compile errors.
4. Add a comment anywhere in `c.C2`, observe compile errors:
```
Description Resource Path Location Type
The type a.A cannot be resolved. It is indirectly referenced from required type b.B C2.java /ProjectC/src/c line 8 Java Problem
```

See screen recording:

https://github.com/user-attachments/assets/0bacd25a-fd84-4584-a9cc-cbbdd4683e28

Note that `c.C1` and `c.C2` are named so that `c.C2` comes after `c.C1` in lexicographic order. Otherwise the bug doesn't occur.

Reproduced with latest JDT `master`.

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.