Fixes for script binding not working

This commit is contained in:
Deukhoofd 2019-01-20 22:27:47 +01:00
parent 20dfcf6ec6
commit b9183be4e7
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
4 changed files with 8 additions and 6 deletions

View File

@ -41,7 +41,7 @@ namespace Upsilon.BaseTypes.ScriptFunction
{
if (option.Parameters.Length != variables.Length)
continue;
bool isCompatible = true;
var isCompatible = true;
for (var index = 0; index < variables.Length; index++)
{
var parameter = option.Parameters[index];

View File

@ -245,7 +245,7 @@ namespace Upsilon.Binder
}
UnboundFunctionExpression unbound = null;
foreach (var functionExpression in this._unboundFunctions.Where(x =>
foreach (var functionExpression in _unboundFunctions.Where(x =>
{
if (x.Name == function.Name)
{

View File

@ -39,8 +39,7 @@ namespace Upsilon.Binder.VariableSymbols
var callingParameter = callingParameters[i];
if (callingParameter.Type == Type.Unknown || callingParameter.Type == Type.Nil)
{
isValid = false;
break;
continue;
}
if (!functionParameter.ValidTypes.Type.HasFlag(callingParameter.Type))

View File

@ -84,7 +84,10 @@ namespace Upsilon.BoundTypes
else
{
methods.Add(methodName,
new UserDataBoundMethod(methodName, new List<UserDataBoundMethodOption>() {option}));
new UserDataBoundMethod(methodName, new List<UserDataBoundMethodOption>() {option})
{
Type = Type.Function
});
}
}