fix: force type var short form as a key in generic resolve mapping (#2370)

This commit is contained in:
Skylot
2024-12-22 21:04:07 +00:00
parent 7a2dad8ef2
commit de629544a3
2 changed files with 51 additions and 0 deletions
@@ -226,6 +226,10 @@ public class TypeUtils {
for (int i = 0; i < genericParamsCount; i++) {
ArgType actualType = actualTypes.get(i);
ArgType typeVar = typeParameters.get(i);
if (typeVar.getExtendTypes() != null) {
// force short form (only type var name)
typeVar = ArgType.genericType(typeVar.getObject());
}
replaceMap.put(typeVar, actualType);
}
return replaceMap;