- When calling `replace(Statement, Statement)`, if we hit the `variableAssignment` replacement check, first check and ensure it is not null`, try
This commit is contained in:
Tristan B. Velloza Kildaire 2023-07-26 16:19:49 +02:00
parent 220e4789c4
commit 239832a74a
1 changed files with 7 additions and 2 deletions

View File

@ -508,11 +508,16 @@ public class Variable : TypedEntity, MStatementSearchable, MStatementReplaceable
assignment = cast(VariableAssignment)that;
return true;
}
/* Recurse on the variable assignment */
else
/* Recurse on the variable assignment (if there is one) */
else if(assignment !is null)
{
return assignment.replace(thiz, that);
}
/* Exhausted all possibilities */
else
{
return false;
}
}
/**