Skip to content

Commit 674774a

Browse files
author
emmanue1
committed
Fix generic type errors
1 parent 5707b2b commit 674774a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/jd/core/v1/service/converter/classfiletojavasyntax/util/TypeParametersToTypeArgumentsBinder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,10 @@ public void visit(MethodInvocationExpression expression) {
547547
@Override
548548
public void visit(LocalVariableReferenceExpression expression) {
549549
AbstractLocalVariable localVariable = ((ClassFileLocalVariableReferenceExpression) expression).getLocalVariable();
550-
localVariable.typeOnLeft(contextualTypeBounds, checkTypeArguments(type, localVariable));
550+
if (localVariable.getFromOffset() > 0) {
551+
// Do not update parameter
552+
localVariable.typeOnLeft(contextualTypeBounds, checkTypeArguments(type, localVariable));
553+
}
551554
}
552555

553556
@Override

0 commit comments

Comments
 (0)