Fixes for script binding not working
This commit is contained in:
parent
20dfcf6ec6
commit
b9183be4e7
|
@ -41,11 +41,11 @@ 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];
|
||||||
var parameterSymbol = ((UserDataVariableSymbol)parameter.VariableSymbol);
|
var parameterSymbol = ((UserDataVariableSymbol) parameter.VariableSymbol);
|
||||||
var parameterType = variables[index].GetType();
|
var parameterType = variables[index].GetType();
|
||||||
if (parameterSymbol.BoundTypeDefinition != null)
|
if (parameterSymbol.BoundTypeDefinition != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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