Browse Source

fcl-passrc: fixed compile with pas2js

mattias 1 year ago
parent
commit
3423fa9a82
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/fcl-passrc/src/pparser.pp

+ 5 - 1
packages/fcl-passrc/src/pparser.pp

@@ -8351,6 +8351,7 @@ var
   SrcPos: TPasSourcePos;
   SrcPos: TPasSourcePos;
   I : Integer;
   I : Integer;
   V : TPasVariable;
   V : TPasVariable;
+  Obj: TObject;
 
 
 begin
 begin
   // var a : Integer;
   // var a : Integer;
@@ -8372,7 +8373,10 @@ begin
   finally
   finally
      For I:=0 to List.count-1 do
      For I:=0 to List.count-1 do
        if List[i]<>Nil then
        if List[i]<>Nil then
-         TObject(List[I]).Free;
+         begin
+         Obj:=TObject(List[I]);
+         Obj.Free;
+         end;
      List.Free;
      List.Free;
   end;
   end;