Fixes for modules and function binding
This commit is contained in:
parent
3737ac826c
commit
01d408e5fd
|
@ -77,6 +77,9 @@ namespace Upsilon.BaseTypes.ScriptFunction
|
|||
{
|
||||
var callingVariable = variables[index];
|
||||
var optionVariable = option.Parameters[index];
|
||||
if (callingVariable.Type == BaseTypes.Type.Unknown || callingVariable.Type == BaseTypes.Type.Nil ||
|
||||
optionVariable.Type == BaseTypes.Type.Unknown)
|
||||
continue;
|
||||
if (callingVariable.Type != optionVariable.Type)
|
||||
{
|
||||
isCompatible = false;
|
||||
|
|
|
@ -258,12 +258,16 @@ namespace Upsilon.Binder
|
|||
unbound = functionExpression;
|
||||
break;
|
||||
}
|
||||
unbound.Block = (BoundBlockStatement) BindBlockStatement(unbound.UnboundBlock);
|
||||
|
||||
returnType = Scope.ReturnType;
|
||||
Scope = Scope.ParentScope;
|
||||
functionOption.IsBound = true;
|
||||
functionOption.ResultType = returnType;
|
||||
if (unbound != null)
|
||||
{
|
||||
unbound.Block = (BoundBlockStatement) BindBlockStatement(unbound.UnboundBlock);
|
||||
|
||||
returnType = Scope.ReturnType;
|
||||
Scope = Scope.ParentScope;
|
||||
functionOption.IsBound = true;
|
||||
functionOption.ResultType = returnType;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue