File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5485,7 +5485,7 @@ def err_selector_element_not_lvalue : Error<
5485
5485
def err_selector_element_type : Error<
5486
5486
"selector element type %0 is not a valid object">;
5487
5487
def err_collection_expr_type : Error<
5488
- "collection expression type %0 is not a valid object">;
5488
+ "the type %0 is not a pointer to a fast-enumerable object">;
5489
5489
def warn_collection_expr_type : Warning<
5490
5490
"collection expression type %0 may not respond to %1">;
5491
5491
Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ - (void)compilerTestAgainst {
26
26
27
27
int i=0 ;
28
28
for (int * elem in elem) // expected-error {{selector element type 'int *' is not a valid object}} \
29
- expected-error {{collection expression type 'int *' is not a valid object}}
29
+ expected-error {{the type 'int *' is not a pointer to a fast-enumerable object}}
30
30
++i;
31
31
for (i in elem) // expected-error {{use of undeclared identifier 'elem'}} \
32
32
expected-error {{selector element type 'int' is not a valid object}}
33
33
++i;
34
- for (id se in i) // expected-error {{collection expression type 'int' is not a valid object}}
34
+ for (id se in i) // expected-error {{the type 'int' is not a pointer to a fast-enumerable object}}
35
35
++i;
36
36
}
37
37
@end
Original file line number Diff line number Diff line change @@ -38,20 +38,20 @@ @interface NSString
38
38
template <typename E, typename T>
39
39
void fast_enumeration_test (T collection) {
40
40
for (E element in collection) { // expected-error{{selector element type 'int' is not a valid object}} \
41
- // expected-error{{collection expression type 'vector' is not a valid object}}
41
+ // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
42
42
eat (element);
43
43
}
44
44
45
45
E element;
46
46
for (element in collection) // expected-error{{selector element type 'int' is not a valid object}} \
47
- // expected-error{{collection expression type 'vector' is not a valid object}}
47
+ // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
48
48
eat (element);
49
49
50
- for (NSString *str in collection) // expected-error{{collection expression type 'vector' is not a valid object}}
50
+ for (NSString *str in collection) // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
51
51
eat (str);
52
52
53
53
NSString *str;
54
- for (str in collection) // expected-error{{collection expression type 'vector' is not a valid object}}
54
+ for (str in collection) // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
55
55
eat (str);
56
56
}
57
57
You can’t perform that action at this time.
0 commit comments