signature() attribute has wrong value for ConstructorDecl (fix provided)

Issue #71 resolved
Sergiy Kolesnikov
created an issue

Example code:

class Node {
    Node(String name) {}
}

The value of the signature attribute for the Node-constructor is Node(AST.ParameterDeclaration) instead of the correct one Node(java.lang.String).

It is a regression after commit 8dbee0d, after which ASTNode.toString() does not pretty print AST nodes any more.

The fix is to replace the line 116 in java4/frontend/LookupConstructor.jrag with this one:

s.append(getParameter(i).type().typeName());

Comments (2)

  1. Jesper Öqvist

    Thank you for spotting this! I am sorry I did not respond to this earlier - I have had email notifications disabled for bitbucket so I did not notice this issue until just now. I am testing this fix and will hopefully push the commit soon!

  2. Log in to comment