Fixes for binder not being able to get proper method

This commit is contained in:
Deukhoofd 2018-12-09 12:25:29 +01:00
parent 92586e4939
commit fb2af879c9
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 8 additions and 0 deletions

View File

@ -74,6 +74,14 @@ namespace Upsilon.BaseTypes.UserData
continue; 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)) if (!matchParameter.ParameterType.IsAssignableFrom(argumentType))
{ {
validMatch = false; validMatch = false;