2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
2008-08-26 02:16:36 +08:00
|
|
|
|
|
|
|
@class NSArray;
|
|
|
|
|
|
|
|
void f(NSArray *a)
|
|
|
|
{
|
2008-11-24 14:25:27 +08:00
|
|
|
for (int i in a); // expected-error{{selector element type 'int' is not a valid object}}
|
2008-08-26 02:16:36 +08:00
|
|
|
for ((id)2 in a); // expected-error{{selector element is not a valid lvalue}}
|
|
|
|
for (2 in a); // expected-error{{selector element is not a valid lvalue}}
|
2008-11-24 14:25:27 +08:00
|
|
|
}
|