You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While debugging #1628 I came across the situation that the assumption we use in some C# AST transforms (especially relevant for DeclareVariables), "that AstNode.FirstChild is always the first sub-expression/node that will be evaluated when the program is executed" is no longer true.
For example: BinaryOperatorExpression.Left == BinaryOperatorExpression.FirstChild is no longer true for some nodes in the tree in the final output visitor run.
This causes the problem that VariableToDeclare.FirstUse points to an expression in the middle of the operators and not to the first use.
Note that the DeclareVariables.Analyze run we do in PatternStatementTransform did not observe this problem.
We need some mechanism similar to the ILAst CheckInvariant structure to verify our assumptions about the structure of the C# AST.
The text was updated successfully, but these errors were encountered:
#2033: This was caused because we generally assume that all C# Statement nodes that represent loops have their loop BlockContainer annotated. In this case the annotation was missing. An assertion could easily find such bugs.
While debugging #1628 I came across the situation that the assumption we use in some C# AST transforms (especially relevant for DeclareVariables), "that
AstNode.FirstChild
is always the first sub-expression/node that will be evaluated when the program is executed" is no longer true.For example:
BinaryOperatorExpression.Left == BinaryOperatorExpression.FirstChild
is no longer true for some nodes in the tree in the final output visitor run.This causes the problem that
VariableToDeclare.FirstUse
points to an expression in the middle of the operators and not to the first use.Note that the
DeclareVariables.Analyze
run we do inPatternStatementTransform
did not observe this problem.We need some mechanism similar to the ILAst
CheckInvariant
structure to verify our assumptions about the structure of the C# AST.The text was updated successfully, but these errors were encountered: