소스 검색

* 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
 ****************************************************************************}