blob: 807efd9fa71f09d3629ca08a0ddb6e0eb566f5e8 [file] [log] [blame]
Fariborz Jahanian8ce5da32008-01-07 17:52:35 +00001// RUN: clang -fsyntax-only -verify %s
2
3typedef struct objc_class *Class;
4typedef struct objc_object {
5 Class isa;
6} *id;
7
8
9@protocol P @end
10
11@interface MyList
12@end
13
14@implementation MyList
15- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
16{
17 return 0;
18}
19@end
20
21@interface MyList (BasicTest)
22- (void)compilerTestAgainst;
23@end
24
25@implementation MyList (BasicTest)
26- (void)compilerTestAgainst {
27 static i;
28 for (id el, elem in self) // expected-error {{Only one element declaration is allowed}}
29 ++i;
30 for (id el in self)
31 ++i;
32 MyList<P> ***p;
33 for (p in self)
34 ++i;
35
36}
37@end
38