summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/property-impl-misuse.m
blob: 5bbc3f19c090e8529e15c1ec391d74cd35991f50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang -cc1 -fsyntax-only -verify %s

@interface I {
  int Y;
}
@property int X;
@property int Y;
@property int Z;
@end

@implementation I
@dynamic X; // expected-note {{previous declaration is here}}
@dynamic X; // expected-error {{property 'X' is already implemented}}
@synthesize Y; // expected-note {{previous use is here}}
@synthesize Z=Y; // expected-error {{synthesized properties 'Z' and 'Y' both claim ivar 'Y'}}
@end