Browse Source

[eval] fix non-closure method access

e.g. `member == null`
Simon Krajewski 7 years ago
parent
commit
874fddf419
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/macro/eval/evalJit.ml

+ 2 - 1
src/macro/eval/evalJit.ml

@@ -417,7 +417,8 @@ and jit_expr jit return e =
 			| FInstance({cl_path=([],"Array")},_,{cf_name="length"}) -> emit_array_length_read (jit_expr jit false e1)
 			| FInstance({cl_path=(["eval"],"Vector")},_,{cf_name="length"}) -> emit_vector_length_read (jit_expr jit false e1)
 			| FInstance({cl_path=(["haxe";"io"],"Bytes")},_,{cf_name="length"}) -> emit_bytes_length_read (jit_expr jit false e1)
-			| FStatic({cl_path=path},_) | FEnum({e_path=path},_) ->
+			| FStatic({cl_path=path},_) | FEnum({e_path=path},_)
+			| FInstance({cl_path=path},_,{cf_kind = Method (MethNormal | MethInline)}) ->
 				let proto = get_static_prototype ctx (path_hash path) e1.epos in
 				emit_proto_field_read proto (get_proto_field_index proto name)
 			| FInstance(c,_,_) when not c.cl_interface ->