From fb2af879c9281d72bc10c8f95a2ffd22d4611291 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 9 Dec 2018 12:25:29 +0100 Subject: [PATCH] Fixes for binder not being able to get proper method --- Upsilon/BaseTypes/UserData/UpsilonBinder.cs | 8 ++++++++ 1 file changed, 8 insertions(+) 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;