tree-sitter-objc/examples/SemaObjC/comptypes-6.m

17 lines
316 B
Mathematica
Raw Normal View History

2022-04-16 15:58:26 +00:00
// 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 'Derived *' with an expression of type 'Object *'}}
return m;
}