diff --git a/Upsilon/BaseTypes/UserData/UpsilonBinder.cs b/Upsilon/BaseTypes/UserData/UpsilonBinder.cs index b5ece23..13cc39b 100644 --- a/Upsilon/BaseTypes/UserData/UpsilonBinder.cs +++ b/Upsilon/BaseTypes/UserData/UpsilonBinder.cs @@ -74,6 +74,14 @@ namespace Upsilon.BaseTypes.UserData continue; } + if (!typeof(ScriptType).IsAssignableFrom(matchParameter.ParameterType) && + argument is IUserData ud) + { + var csharpType = ud.GetCSharpType(); + if (matchParameter.ParameterType.IsAssignableFrom(csharpType)) + continue; + } + if (!matchParameter.ParameterType.IsAssignableFrom(argumentType)) { validMatch = false;