eclipse-jdt / eclipse-jdt/eclipse.jdt.core
[type inference] Type mismatch: cannot convert error - javac compiles
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
Test case to reproduce:
```
interface V {}
abstract class A implements V {
public static A getA(T value) {
return null;
}
}
interface J {}
interface K {
X foo();
}
// javac compiles while ecj gives the following error
public class X {
public A> bar() {
return A.getA( // ERROR: Type mismatch: cannot convert from A to A>
new K() {
@Override
public X foo() {
return null;
}
});
}
}
```
ecj throws "ERROR: Type mismatch: cannot convert from A to A>"
@srikanth-sankaran could you please have a quick look if time permits? thanks
Contributor guide
Assessment
This issue has not been assessed yet.