Răsfoiți Sursa

[typing] fix position of indices when unrolling loops

see #7664
Simon Krajewski 6 ani în urmă
părinte
comite
712680404c
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/typing/forLoop.ml

+ 1 - 1
src/typing/forLoop.ml

@@ -195,7 +195,7 @@ module IterationKind = struct
 			let el = ExtList.List.init length (fun i ->
 				let ei = make_int ctx.t (if ascending then i + offset else offset - i) p in
 				let rec loop e = match e.eexpr with
-					| TLocal v' when v == v' -> ei
+					| TLocal v' when v == v' -> {ei with epos = e.epos}
 					| _ -> map_expr loop e
 				in
 				let e2 = loop e2 in