freebsd-dev/test/SemaObjC/comptypes-6.m
2010-01-01 10:34:51 +00:00

17 lines
299 B
Objective-C

// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
@interface Derived
@end
@interface Object @end
extern Object* foo(void);
static Derived *test(void)
{
Derived *m = foo(); // expected-warning {{incompatible pointer types initializing 'Object *', expected 'Derived *'}}
return m;
}