瀏覽代碼

* Change TImplementedInterface.GetCopy from a warning at compile time to an internalerror if called

git-svn-id: trunk@17752 -
pierre 14 年之前
父節點
當前提交
4850190663
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      compiler/symdef.pas

+ 5 - 2
compiler/symdef.pas

@@ -5420,15 +5420,18 @@ implementation
     function TImplementedInterface.getcopy:TImplementedInterface;
       begin
         Result:=TImplementedInterface.Create(nil);
-        {$warning: this is completely wrong on so many levels...}
         { 1) the procdefs list will be freed once for each copy
           2) since the procdefs list owns its elements, those will also be freed for each copy
           3) idem for the name mappings
         }
+        { warning: this is completely wrong on so many levels...
         Move(pointer(self)^,pointer(result)^,InstanceSize);
+        We need to make clean copies of the different fields
+        this is not implemented yet, and thus we generate an internal
+        error instead PM 2011-06-14 }
+        internalerror(2011061401);
       end;
 
-
 {****************************************************************************
                                 TFORWARDDEF
 ****************************************************************************}