Bug 60459 - AST: 'malformed' flag overwrites other flags
Summary: AST: 'malformed' flag overwrites other flags
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-29 12:44 EDT by Martin Aeschlimann CLA
Modified: 2004-05-18 11:51 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2004-04-29 12:44:14 EDT
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'
Comment 1 Martin Aeschlimann CLA 2004-04-29 12:47:40 EDT
what happens is that malformed nodes don't have the 'ORIGINAL' flag set anymore
what confuses the ASTRewriter
Comment 2 Olivier Thomann CLA 2004-04-29 13:47:03 EDT
This is trivial to fix.
Call to node.setFlags(ASTNode.MALFORMED); should be replaced with:
node.setFlags(node.getFlags() | ASTNode.MALFORMED);
Comment 3 Olivier Thomann CLA 2004-04-29 14:51:45 EDT
Fixed and released in HEAD.
Regression test added.
I test that ORIGINAL is preserved when MALFORMED is set in
ASTConverterTest.test0153.
Comment 4 David Audel CLA 2004-05-18 11:51:36 EDT
Verified or 3.0M9