Przeglądaj źródła

* don't warn that a constructor is necessary for objc classes/protocols
(since they can't have a constructor)

git-svn-id: branches/objc@13632 -

Jonas Maebe 16 lat temu
rodzic
commit
f586299b6a
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      compiler/pdecobj.pas

+ 2 - 1
compiler/pdecobj.pas

@@ -841,7 +841,8 @@ implementation
         { for implemented classes with a vmt check if there is a constructor }
         if (oo_has_vmt in current_objectdef.objectoptions) and
            not(oo_is_forward in current_objectdef.objectoptions) and
-           not(oo_has_constructor in current_objectdef.objectoptions) then
+           not(oo_has_constructor in current_objectdef.objectoptions) and
+           not is_objc_class_or_protocol(current_objectdef) then
           Message1(parser_w_virtual_without_constructor,current_objectdef.objrealname^);
 
         if is_interface(current_objectdef) or