Fix for regression in Node2Code.#11373
Conversation
|
@aparajit-pratap thanks for fixing this so quickly, |
| if (strIdentList.Length == 1) | ||
| { | ||
| return new IdentifierNode(strIdentList[0]); | ||
| return node; |
There was a problem hiding this comment.
If my memory serves correctly, then the AST walkers are a bit inconsistent when it comes to returning new AST nodes or the same node - maybe this should return a copy of the node instead?
There was a problem hiding this comment.
The AST walkers are meant to return new nodes only if they are rewritten and return the original node if there is no change.
There was a problem hiding this comment.
ah! Is that documented somewhere? Would it make sense to add a note about that to the base class or something? Not that it needs to be part of this pr.
mmisol
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks for fixing @aparajit-pratap !
Purpose
Fix for regression in Node2Code.
Declarations
Check these if you believe they are true
*.resxfilesFYIs
@saintentropy