Quellcode durchsuchen

* correctly enumerate the fields of the TVMT record after the previous extension of it (GetvParent and vParent are two new symbols and TVMT does not only contain fieldvarsyms now) so that the VMT def can be correctly generated

git-svn-id: trunk@34173 -
svenbarth vor 9 Jahren
Ursprung
Commit
f18e6cec0b
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      compiler/nobj.pas

+ 4 - 2
compiler/nobj.pas

@@ -837,15 +837,17 @@ implementation
                 easily triggered in case the definition of the VMT would
                 easily triggered in case the definition of the VMT would
                 change) }
                 change) }
               if (systemvmt.typ<>recorddef) or
               if (systemvmt.typ<>recorddef) or
-                 (trecorddef(systemvmt).symtable.SymList.count<>25) then
+                 (trecorddef(systemvmt).symtable.SymList.count<>27) then
                 internalerror(2015052601);
                 internalerror(2015052601);
               { system.tvmt is a record that represents the VMT of TObject,
               { system.tvmt is a record that represents the VMT of TObject,
                 including its virtual methods. We only want the non-method
                 including its virtual methods. We only want the non-method
                 fields, as the methods will be added automatically based on
                 fields, as the methods will be added automatically based on
                 the VMT we generated here only add the 12 first fields }
                 the VMT we generated here only add the 12 first fields }
-              for i:=0 to 11 do
+              for i:=0 to 13 do
                 begin
                 begin
                   sym:=tsym(trecorddef(systemvmt).symtable.SymList[i]);
                   sym:=tsym(trecorddef(systemvmt).symtable.SymList[i]);
+                  if sym.typ in [procsym,propertysym] then
+                    continue;
                   if sym.typ<>fieldvarsym then
                   if sym.typ<>fieldvarsym then
                     internalerror(2015052602);
                     internalerror(2015052602);
                   vmtdef.add_field_by_def('',tfieldvarsym(sym).vardef);
                   vmtdef.add_field_by_def('',tfieldvarsym(sym).vardef);