Browse Source

check for Meta.This instead of v_name = "this"

Aleksandr Kuzmenko 5 years ago
parent
commit
080f129ee4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/typing/typer.ml

+ 1 - 1
src/typing/typer.ml

@@ -630,7 +630,7 @@ let rec type_binop ctx op e1 e2 is_assign_op with_type p =
 			in
 			let l = save_locals ctx in
 			let v,init_exprs,abstr_this_to_modify = match et.eexpr with
-				| TLocal v when not (v.v_name = "this") -> v,[],None
+				| TLocal v when not (Meta.has Meta.This v.v_meta) -> v,[],None
 				| _ ->
 					let v = gen_local ctx ta ef.epos in
 					let decl_v e = mk (TVar (v,Some e)) ctx.t.tvoid p in