summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/property/synthesize-1.mm
blob: fb9b38ea1d8e7622e25d00c0edd44f32194135f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* { dg-do compile } */

#include <objc/objc.h>

@interface MyRootClass
{
  Class isa;
}
@end

@implementation MyRootClass
@end

@synthesize isa;                    /* { dg-error "misplaced .@synthesize. Objective-C.. construct" } */

@interface Test : MyRootClass
{
  int v1;
  int v2;
  int v3;
  int v4;
}
@end

@implementation Test
@synthesize;                        /* { dg-error "expected identifier" } */
@synthesize v1, ;                   /* { dg-error "expected identifier" } */
@synthesize v1, v2 = ;              /* { dg-error "expected identifier" } */
@synthesize v1, v2=v2, v3 = v3,v4;  /* { dg-error ".@synthesize. is not supported in this version of the compiler" } */
@synthesize v4;                     /* { dg-error ".@synthesize. is not supported in this version of the compiler" } */
@end