mirror of
https://github.com/autc04/Retro68.git
synced 2024-06-28 11:30:19 +00:00
20 lines
498 B
Objective-C
20 lines
498 B
Objective-C
/* When assigning function pointers, allow for covariant return types
|
|
and contravariant argument types. */
|
|
/* { dg-do compile } */
|
|
#include "../objc-obj-c++-shared/TestsuiteObject.h"
|
|
|
|
@class Derived;
|
|
|
|
TestsuiteObject *ExternFunc (TestsuiteObject *filePath, TestsuiteObject *key);
|
|
typedef id FuncSignature (TestsuiteObject *arg1, Derived *arg2);
|
|
|
|
@interface Derived: TestsuiteObject
|
|
+ (void)registerFunc:(FuncSignature *)function;
|
|
@end
|
|
|
|
void foo(void)
|
|
{
|
|
[Derived registerFunc: ExternFunc];
|
|
}
|
|
|