Sfoglia il codice sorgente

* 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 anni fa
parent
commit
d4864854cc
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  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
           begin
             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 }
             if (po_abstractmethod in pd.procoptions) then
               continue;