2
0
Эх сурвалжийг харах

adjust "for" loop positions to comply with test #5172

Aleksandr Kuzmenko 5 жил өмнө
parent
commit
2ef1ee5fcf
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      src/typing/forLoop.ml

+ 1 - 1
src/typing/forLoop.ml

@@ -345,7 +345,7 @@ module IterationKind = struct
 			]) t_void p
 		| IteratorInt(a,b) ->
 			check_loop_var_modification [v] e2;
-			let v_index = gen_local ctx t_int v.v_pos in
+			let v_index = gen_local ctx t_int a.epos in
 			let evar_index = mk (TVar(v_index,Some a)) t_void a.epos in
 			let ev_index = make_local v_index v_index.v_pos in
 			let v_b = gen_local ctx b.etype b.epos in