eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Unexpected type mismatch error for Either and Either.Right
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
This was initially reported in https://github.com/redhat-developer/vscode-java/issues/4178, but is actually an ECJ issue, tested on Eclipse 2025-06.
The following code, using Reactor Core's Mono and Arrow Core's Either generate a compilation error, while javac compiles fine:
```java
public Mono>> nok() {
return Mono.just(new Either.Right<>(Collections.emptyList()));
}
```
I'm attaching a self-contained Eclipse project, including the required jars, you can import it as a regular Eclipse project. It can also be imported as a Maven project, it makes no difference for JDT. FTR, I used my very very old [JBoss Tools JDT feature](https://docs.jboss.org/tools/whatsnew/core/core-news-3.3.0.M4.html) to convert Maven dependencies to local lib jars (menu now named "Copy Classpath Libraries...")
[testproject.zip](https://github.com/user-attachments/files/22737863/testproject.zip)
cc @jjohnstn
Contributor guide
Assessment
This issue has not been assessed yet.