Browse Source

* allow Objective-C classes/protocols in C varargs parameter lists

git-svn-id: branches/objc@13460 -
Jonas Maebe 16 years ago
parent
commit
a25e791ff8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/ncnv.pas

+ 2 - 1
compiler/ncnv.pas

@@ -613,7 +613,8 @@ implementation
               if iscvarargs then
                 p:=ctypeconvnode.create(p,voidpointertype);
             objectdef :
-              if iscvarargs or
+              if (iscvarargs and
+                  not is_objc_class_or_protocol(p.resultdef)) or
                  is_object(p.resultdef) then
                 CGMessagePos1(p.fileinfo,type_e_wrong_type_in_array_constructor,p.resultdef.typename);
             else