浏览代码

* hack to workaround an IE with forward classes were
a child class is declared before the parent class. Resulting
in the wrong order in the ppu

git-svn-id: trunk@1105 -

peter 20 年之前
父节点
当前提交
89d4cc68c0
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      compiler/symdef.pas

+ 7 - 0
compiler/symdef.pas

@@ -5213,6 +5213,13 @@ implementation
 
 
     function tobjectdef.getparentdef:tdef;
     function tobjectdef.getparentdef:tdef;
       begin
       begin
+{$warning TODO Remove getparentdef hack}
+        { With 2 forward declared classes with the child class before the
+	  parent class the child class is written earlier to the ppu. Leaving it
+	  possible to have a reference to the parent class for property overriding,
+	  but the parent class still has the childof not resolved yet (PFV) }
+        if childof=nil then
+          childof:=tobjectdef(childofderef.resolve);
         result:=childof;
         result:=childof;
       end;
       end;