소스 검색

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

Aleksandr Kuzmenko 5 년 전
부모
커밋
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