25 lines · plain
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s2 3@class XX;4 5void func() {6 XX *obj;7 void *vv;8 9 obj = vv; // expected-error{{assigning to 'XX *' from incompatible type 'void *'}}10}11 12@interface I13{14 void* delegate;15}16- (I*) Meth;17- (I*) Meth1;18@end19 20@implementation I 21- (I*) Meth { return static_cast<I*>(delegate); }22- (I*) Meth1 { return reinterpret_cast<I*>(delegate); }23@end24 25