Browse Source

* extra typecasts to more easily catch errors with -CR if some defs are
not properly re-resolved (no change in generated code without -CR)

git-svn-id: trunk@14619 -

Jonas Maebe 15 years ago
parent
commit
d4864854cc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/optvirt.pas

+ 3 - 1
compiler/optvirt.pas

@@ -434,7 +434,9 @@ unit optvirt;
         for i:=0 to node.def.vmtentries.count-1 do
         for i:=0 to node.def.vmtentries.count-1 do
           begin
           begin
             currnode:=node;
             currnode:=node;
-            pd:=pvmtentry(currnode.def.vmtentries[i])^.procdef;
+            { extra tprocdef(tobject(..)) typecasts so that -CR can catch
+              errors in case the vmtentries are not properly (re)deref'd }
+            pd:=tprocdef(tobject(pvmtentry(currnode.def.vmtentries[i])^.procdef));
             { abstract methods cannot be called directly }
             { abstract methods cannot be called directly }
             if (po_abstractmethod in pd.procoptions) then
             if (po_abstractmethod in pd.procoptions) then
               continue;
               continue;