summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm
blob: 07438a6f375f4085be0e58cbe0da7b7604eba790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Property name cannot match the ivar name. */
/* { dg-do compile } */
/* Suppress warnings for incomplete class definition etc. */
/* { dg-options "-w" } */

@interface Person 
{
  char *firstName;
}
@property char *firstName; /* { dg-error "property 'firstName' may not have the same name as an ivar in the class" } */
@end	

@implementation  Person
@end