Anders Carlsson | 1fe379f | 2008-08-25 18:16:36 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
2 | |||||
3 | @class NSArray; | ||||
4 | |||||
5 | void f(NSArray *a) | ||||
6 | { | ||||
7 | for (int i in a); // expected-error{{selector element type ('int') is not a valid object}} | ||||
8 | for ((id)2 in a); // expected-error{{selector element is not a valid lvalue}} | ||||
9 | for (2 in a); // expected-error{{selector element is not a valid lvalue}} | ||||
10 | } |