xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/ivar-in-class-extension-error.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc// rdar://6812436
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@interface A @end
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuc@interface A () {
7*f4a2713aSLionel Sambuc  int _p0; // expected-error {{instance variables may not be placed in class extension}}
8*f4a2713aSLionel Sambuc}
9*f4a2713aSLionel Sambuc@property int p0;
10*f4a2713aSLionel Sambuc@end
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuc@interface A(CAT) {
13*f4a2713aSLionel Sambuc  int _p1; // expected-error {{instance variables may not be placed in categories}}
14*f4a2713aSLionel Sambuc}
15*f4a2713aSLionel Sambuc@end
16