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

Potential type inference issue

Open
#1,313 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 10h
Merged PRs (30d)
49

Description

Given a method like this:
```java
public static final Class foo(Collection> classes) {
return null;
}
```
with jshell I can do this:
```jshell
jshell> Class x = foo(List.of(double[][].class, Long[][].class));
x ==> null
```
while with eclipse I get this:
![image](https://github.com/eclipse-jdt/eclipse.jdt.core/assets/4885222/51004aeb-7e2e-493e-8b66-01005fb86533)

Note that for `double[][]` --> `Double[][]` it correctly infers `Number[][]`.

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.