Fix b/243747010

Set `ASTMethod.getImage` to name of type for constructors
This commit is contained in:
Edward Klimoshenko 2022-08-21 14:00:58 +00:00 committed by Aaron Hurst
parent 90aec7a9e1
commit 9e5d4d48a8

View File

@ -50,6 +50,12 @@ public class ASTMethod extends AbstractApexNode.Single<MethodDeclaration> implem
@Override
public String getImage() {
if (node.isConstructor()) {
ApexRootNode<?> rootNode = getFirstParentOfType(ApexRootNode.class);
if (rootNode != null) {
return rootNode.node.getId().getString();
}
}
return getName();
}