Nicolas Cannasse %!s(int64=7) %!d(string=hai) anos
pai
achega
668abdaeba
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/generators/genhl.ml

+ 2 - 1
src/generators/genhl.ml

@@ -515,8 +515,9 @@ and real_type ctx e =
 					| TInst ({cl_kind=KTypeParameter _},_), TFun _ -> a2
 					(*
 						If we have a number, it is more accurate to cast it to the type parameter before wrapping it as dynamic
+						Ignore dynamic method (#7166)
 					*)
-					| TInst ({cl_kind=KTypeParameter _},_), t when is_number (to_type ctx t) ->
+					| TInst ({cl_kind=KTypeParameter _},_), t when is_number (to_type ctx t) && (match f with FInstance (_,_,{ cf_kind = Method MethDynamic }) -> false | _ -> true) ->
 						(name, opt, TAbstract (fake_tnull,[t]))
 					| _ ->
 						a