1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 typedef struct objc_object {
4 struct objc_class *isa;
8 struct objc_class *isa;
11 @interface Whatever : NSObject
24 // GCC allows this, with the following warning:
25 // instance variable ‘isa’ is @protected; this will be a hard error in the future
27 // FIXME: see if we can avoid the 2 warnings that follow the error.
28 [(*y).isa self]; // expected-error {{instance variable 'isa' is protected}} \
29 expected-warning{{receiver type 'struct objc_class *' is not 'id' or interface pointer, consider casting it to 'id'}} \
30 expected-warning{{method '-self' not found (return type defaults to 'id')}}
31 [y->isa self]; // expected-error {{instance variable 'isa' is protected}} \
32 expected-warning{{receiver type 'struct objc_class *' is not 'id' or interface pointer, consider casting it to 'id'}} \
33 expected-warning{{method '-self' not found (return type defaults to 'id')}}