فهرست منبع

use field position for `this.field` access in the moved field init

this seems to make more sense and i want to use that position
for ES6 this-before-super errors
Dan Korostelev 6 سال پیش
والد
کامیت
9a8ab5979b
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/filters/filters.ml

+ 1 - 1
src/filters/filters.ml

@@ -554,7 +554,7 @@ let add_field_inits reserved ctx t =
 				match cf.cf_expr with
 				| None -> assert false
 				| Some e ->
-					let lhs = mk (TField(ethis,FInstance (c,List.map snd c.cl_params,cf))) cf.cf_type e.epos in
+					let lhs = mk (TField({ ethis with epos = cf.cf_pos },FInstance (c,List.map snd c.cl_params,cf))) cf.cf_type cf.cf_pos in
 					cf.cf_expr <- None;
 					let eassign = mk (TBinop(OpAssign,lhs,e)) e.etype e.epos in
 					if is_as3 then begin