Remove adding class reference when it's a "this." expression.

This commit is contained in:
Cody 2024-09-27 17:53:28 -06:00
parent c3841a8493
commit d76644ee05

AI 샘플 코드 생성 중입니다

Loading...

View File

@ -175,8 +175,6 @@ public class MyVoidVisitor extends VoidVisitorAdapter<Object>
ResolvedType resolvedType = n.getSymbolResolver().calculateType(thisExpr);
String qualifiedName = resolvedType.asReferenceType().getQualifiedName();
String className = qualifiedName.substring(qualifiedName.lastIndexOf('.') + 1);
String packageName = qualifiedName.substring(0, qualifiedName.lastIndexOf('.'));
this.classFileContainer.putClassReference(className, new ClassReferenceLocation(getOwner(), packageName.replace('.', '/'), fieldName, "reference", line, columnStart, columnEnd + 1));
this.classFileContainer.putField(fieldName, new ClassFieldLocation(className, "reference", line, columnStart, columnEnd + 1));
}
}