// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
@interfaceSomeClass@endintfn1(SomeClass *obj){
obj->privateIvar =1;// expected-error {{'SomeClass' does not have a member named 'privateIvar}}
return obj->publicIvar;// expected-error {{'SomeClass' does not have a member named 'publicIvar'}}
}@interfaceSomeClass(){// @private by default
int privateIvar;@publicint publicIvar;}@endintfn2(SomeClass *obj){
obj->publicIvar =1;return obj->publicIvar // ok
+ obj->privateIvar;// expected-error {{instance variable 'privateIvar' is private}}
}@implementationSomeClassintfn3(SomeClass *obj){
obj->privateIvar =2;return obj->publicIvar // ok
+ obj->privateIvar;// ok
}@end@interfaceSomeClass(Category){int categoryIvar;// expected-error {{instance variables may not be placed in categories}}
}@end@interfaceSomeClass(Category1){}@end