소스 검색

bugfix (close #7166)

Nicolas Cannasse 7 년 전
부모
커밋
668abdaeba
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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