Bug #10850
getAst() usage from TRPL must be read-only
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
History
#2 Updated by Dănuț Filimon 8 months ago
There's a scenario where getAst() using the id of a tree, then that ast is modified. The ast can be modified, but those changes will not be reflected in the copy and this might be a reoccurring pattern in the rules (hidden problems waiting to be discovered). In some cases, the ast (JavaAst) changes will be persisted.
#3 Updated by Constantin Asofiei 8 months ago
Greg, the idea here is to mark ASTs returned by getAst as read-only but only if this is a ProgressAst - the other ones can be read/write. And, if trying to modify such AST (add/remove node, change node attrs or annotations) then log something (do not abend for now).