浏览代码

Avoid invalid typecast error when using -CR option

git-svn-id: trunk@48978 -
pierre 4 年之前
父节点
当前提交
a7de0b365b
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      compiler/htypechk.pas

+ 4 - 3
compiler/htypechk.pas

@@ -625,7 +625,8 @@ implementation
         pd : tprocdef;
         oldcount,
         count: longint;
-        parasym : tparavarsym;
+        sym : tsym;
+        parasym : tparavarsym absolute sym;
       begin
         result:=false;
         count := pf.parast.SymList.count;
@@ -633,8 +634,8 @@ implementation
         oldcount:=count;
         while count > 0 do
           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
                 dec(count);
               end