Fixes for script binding not working
This commit is contained in:
parent
20dfcf6ec6
commit
b9183be4e7
|
@ -41,7 +41,7 @@ namespace Upsilon.BaseTypes.ScriptFunction
|
||||||
{
|
{
|
||||||
if (option.Parameters.Length != variables.Length)
|
if (option.Parameters.Length != variables.Length)
|
||||||
continue;
|
continue;
|
||||||
bool isCompatible = true;
|
var isCompatible = true;
|
||||||
for (var index = 0; index < variables.Length; index++)
|
for (var index = 0; index < variables.Length; index++)
|
||||||
{
|
{
|
||||||
var parameter = option.Parameters[index];
|
var parameter = option.Parameters[index];
|
||||||
|
|
|
@ -245,7 +245,7 @@ namespace Upsilon.Binder
|
||||||
}
|
}
|
||||||
|
|
||||||
UnboundFunctionExpression unbound = null;
|
UnboundFunctionExpression unbound = null;
|
||||||
foreach (var functionExpression in this._unboundFunctions.Where(x =>
|
foreach (var functionExpression in _unboundFunctions.Where(x =>
|
||||||
{
|
{
|
||||||
if (x.Name == function.Name)
|
if (x.Name == function.Name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,8 +39,7 @@ namespace Upsilon.Binder.VariableSymbols
|
||||||
var callingParameter = callingParameters[i];
|
var callingParameter = callingParameters[i];
|
||||||
if (callingParameter.Type == Type.Unknown || callingParameter.Type == Type.Nil)
|
if (callingParameter.Type == Type.Unknown || callingParameter.Type == Type.Nil)
|
||||||
{
|
{
|
||||||
isValid = false;
|
continue;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!functionParameter.ValidTypes.Type.HasFlag(callingParameter.Type))
|
if (!functionParameter.ValidTypes.Type.HasFlag(callingParameter.Type))
|
||||||
|
|
|
@ -84,7 +84,10 @@ namespace Upsilon.BoundTypes
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
methods.Add(methodName,
|
methods.Add(methodName,
|
||||||
new UserDataBoundMethod(methodName, new List<UserDataBoundMethodOption>() {option}));
|
new UserDataBoundMethod(methodName, new List<UserDataBoundMethodOption>() {option})
|
||||||
|
{
|
||||||
|
Type = Type.Function
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue