Community
Participate
Working Groups
20040429 When the MALFORMED flas is set, other existing flags are overwritten (ORIGINAL, PROTECTED) ASTSyntaxErrorPropagator line 60 and others (search for references of 'ASTNode.setFlags'
what happens is that malformed nodes don't have the 'ORIGINAL' flag set anymore what confuses the ASTRewriter
This is trivial to fix. Call to node.setFlags(ASTNode.MALFORMED); should be replaced with: node.setFlags(node.getFlags() | ASTNode.MALFORMED);
Fixed and released in HEAD. Regression test added. I test that ORIGINAL is preserved when MALFORMED is set in ASTConverterTest.test0153.
Verified or 3.0M9