浏览代码

* handle implementing objcprotocols that are defined as formal external
in the current scope, but whose full definition is available elsewhere

git-svn-id: trunk@17171 -

Jonas Maebe 14 年之前
父节点
当前提交
c0423b6a78
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/pdecobj.pas

+ 2 - 1
compiler/pdecobj.pas

@@ -280,12 +280,13 @@ implementation
 
     procedure handleImplementedProtocol(intfdef : tobjectdef);
       begin
+        intfdef:=find_real_objcclass_definition(intfdef,false);
         if not is_objcprotocol(intfdef) then
           begin
              Message1(type_e_protocol_type_expected,intfdef.typename);
              exit;
           end;
-        if (oo_is_forward in intfdef.objectoptions) then
+        if ([oo_is_forward,oo_is_formal] * intfdef.objectoptions <> []) then
           begin
              Message1(parser_e_forward_protocol_declaration_must_be_resolved,intfdef.objrealname^);
              exit;