Explorar o código

Avoid invalid typecast error when using -CR option

git-svn-id: trunk@48978 -
pierre %!s(int64=4) %!d(string=hai) anos
pai
achega
a7de0b365b
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      compiler/htypechk.pas

+ 4 - 3
compiler/htypechk.pas

@@ -625,7 +625,8 @@ implementation
         pd : tprocdef;
         pd : tprocdef;
         oldcount,
         oldcount,
         count: longint;
         count: longint;
-        parasym : tparavarsym;
+        sym : tsym;
+        parasym : tparavarsym absolute sym;
       begin
       begin
         result:=false;
         result:=false;
         count := pf.parast.SymList.count;
         count := pf.parast.SymList.count;
@@ -633,8 +634,8 @@ implementation
         oldcount:=count;
         oldcount:=count;
         while count > 0 do
         while count > 0 do
           begin
           begin
-            parasym:=tparavarsym(pf.parast.SymList[count-1]);
-            if parasym.typ<>paravarsym then
+            sym:=tsym(pf.parast.SymList[count-1]);
+            if sym.typ<>paravarsym then
               begin
               begin
                 dec(count);
                 dec(count);
               end
               end