Handle binding unbound functions later better

This commit is contained in:
Deukhoofd 2018-11-28 13:36:20 +01:00
parent 576273ac56
commit cc029d0689
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ namespace Upsilon.Binder
(BoundBlockStatement) BindBlockStatement(unboundFunctionStatement.Value.UnboundBlock); (BoundBlockStatement) BindBlockStatement(unboundFunctionStatement.Value.UnboundBlock);
var resultType = Scope.ReturnType; var resultType = Scope.ReturnType;
Scope = Scope.ParentScope; Scope = Scope.ParentScope;
var variable = (FunctionVariableSymbol)Scope.Variables[unboundFunctionStatement.Key]; var variable =
(FunctionVariableSymbol) unboundFunctionStatement.Value.Scope.ParentScope.Variables[
unboundFunctionStatement.Key];
variable.IsBound = true; variable.IsBound = true;
variable.ResultType = resultType; variable.ResultType = resultType;
} }