Bläddra i källkod

compiler: fix position information of the for-in loop (needs for correct debug info)

git-svn-id: trunk@14087 -
paul 15 år sedan
förälder
incheckning
e511555d64
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      compiler/nflw.pas

+ 4 - 0
compiler/nflw.pas

@@ -566,7 +566,10 @@ function create_for_in_loop(hloopvar, hloopbody, expr: tnode): tnode;
 var
 var
   pd, movenext: tprocdef;
   pd, movenext: tprocdef;
   current: tpropertysym;
   current: tpropertysym;
+  storefilepos: tfileposinfo;
 begin
 begin
+  storefilepos:=current_filepos;
+  current_filepos:=hloopvar.fileinfo;
   if expr.nodetype=typen then
   if expr.nodetype=typen then
   begin
   begin
     if (expr.resultdef.typ=enumdef) and tenumdef(expr.resultdef).has_jumps then
     if (expr.resultdef.typ=enumdef) and tenumdef(expr.resultdef).has_jumps then
@@ -628,6 +631,7 @@ begin
       end;
       end;
     end;
     end;
   end;
   end;
+  current_filepos:=storefilepos;
 end;
 end;
 
 
 {****************************************************************************
 {****************************************************************************