def err_selector_element_type : Error<
"selector element type %0 is not a valid object">;
def err_collection_expr_type : Error<
- "collection expression type %0 is not a valid object">;
+ "the type %0 is not a pointer to a fast-enumerable object">;
def warn_collection_expr_type : Warning<
"collection expression type %0 may not respond to %1">;
int i=0;
for (int * elem in elem) // expected-error {{selector element type 'int *' is not a valid object}} \
- expected-error {{collection expression type 'int *' is not a valid object}}
+ expected-error {{the type 'int *' is not a pointer to a fast-enumerable object}}
++i;
for (i in elem) // expected-error {{use of undeclared identifier 'elem'}} \
expected-error {{selector element type 'int' is not a valid object}}
++i;
- for (id se in i) // expected-error {{collection expression type 'int' is not a valid object}}
+ for (id se in i) // expected-error {{the type 'int' is not a pointer to a fast-enumerable object}}
++i;
}
@end
template<typename E, typename T>
void fast_enumeration_test(T collection) {
for (E element in collection) { // expected-error{{selector element type 'int' is not a valid object}} \
- // expected-error{{collection expression type 'vector' is not a valid object}}
+ // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(element);
}
E element;
for (element in collection) // expected-error{{selector element type 'int' is not a valid object}} \
- // expected-error{{collection expression type 'vector' is not a valid object}}
+ // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(element);
- for (NSString *str in collection) // expected-error{{collection expression type 'vector' is not a valid object}}
+ for (NSString *str in collection) // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(str);
NSString *str;
- for (str in collection) // expected-error{{collection expression type 'vector' is not a valid object}}
+ for (str in collection) // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(str);
}