Fix nested return not working

This commit is contained in:
Deukhoofd 2018-11-16 14:47:03 +01:00
parent 47e2dadb8d
commit e5ea4d0fde
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 2 additions and 0 deletions

View File

@ -220,6 +220,8 @@ namespace Upsilon.Evaluator
innerEvaluator.EvaluateStatement(boundBlockStatement.ElseStatement.Block); innerEvaluator.EvaluateStatement(boundBlockStatement.ElseStatement.Block);
} }
HasReturned = innerEvaluator.HasReturned; HasReturned = innerEvaluator.HasReturned;
if (HasReturned)
_returnValue = innerEvaluator._returnValue;
_lastValue = innerEvaluator._lastValue; _lastValue = innerEvaluator._lastValue;
} }