diff --git a/source/tlang/compiler/symbols/data.d b/source/tlang/compiler/symbols/data.d index deb6f5b0..6f7acef8 100644 --- a/source/tlang/compiler/symbols/data.d +++ b/source/tlang/compiler/symbols/data.d @@ -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; + } } /**