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

Debugger generates bad code for generics - The type Object is not a valid substitute

Open
#141 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

JDT is not able to generate working code for some generic classes:

```
class test {}
void ___run( some.generic.BaseObjectItf obj, some.generic.Options opts, some.generic.hibernate.ConversionContextItf ctx, some.generic.hibernate.ObjectFactory.FileCompound fc, java.lang.String extension, java.lang.String fileNameSuffix, at.telekom.snwa.STATE objectState, java.lang.StringBuffer bufFilename) throws Throwable {
return obj;
}
}
```

Debugging leads to Error:
>Bound mismatch: The type Object is not a valid substitute for the bounded parameter > of the type BaseObjectItf

Environment:
Project: jdk-11u28
Eclipse:
```
-vm
/work/java/jdk17/bin/java
-application
org.eclipse.ui.ide.workbench
-startup
plugins/org.eclipse.equinox.launcher_1.6.300.v20210813-1054.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.300.v20210828-0802
-product
com.jboss.devstudio.core.product
--launcher.defaultAction
```

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.