Debian Codegraph @

gcc/testsuite/objc.dg/comp-types-12.m

raw
1 /* When assigning function pointers, allow for covariant return types
2 and contravariant argument types. */
3 /* { dg-do compile } */
4 #include "../objc-obj-c++-shared/TestsuiteObject.h"
5
6 @class Derived;
7
8 TestsuiteObject *ExternFunc (TestsuiteObject *filePath, TestsuiteObject *key);
9 typedef id FuncSignature (TestsuiteObject *arg1, Derived *arg2);
10
11 @interface Derived: TestsuiteObject
12 + (void)registerFunc:(FuncSignature *)function;
13 @end
14
15 void foo(void)
16 {
17 [Derived registerFunc: ExternFunc];
18 }
19