Explorar o código

Fix Runtime.callMethod failing when there are multiple overloads and passing null as one of the reference type parameters

Dan Ogles %!s(int64=11) %!d(string=hai) anos
pai
achega
0201be4ba3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      std/cs/internal/Runtime.hx

+ 1 - 1
std/cs/internal/Runtime.hx

@@ -426,7 +426,7 @@ import cs.system.Object;
 					{
 					{
 						var param = params[i].ParameterType;
 						var param = params[i].ParameterType;
 						var strParam = param + "";
 						var strParam = param + "";
-						if (param.IsAssignableFrom(ts[i]))
+						if (param.IsAssignableFrom(ts[i]) || (ts[i] == null && !param.IsValueType))
 						{
 						{
 							//if it is directly assignable, we'll give it top rate
 							//if it is directly assignable, we'll give it top rate
 							continue;
 							continue;