1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 - (int)objectAtIndexedSubscript:(int)index; // expected-note {{method 'objectAtIndexedSubscript:' declared here}}
5 - (void)setObject:(int)object atIndexedSubscript:(int)index; // expected-note {{parameter of type 'int' is declared here}}
8 @interface NSMutableDictionary
9 - (int)objectForKeyedSubscript:(id)key; // expected-note {{method 'objectForKeyedSubscript:' declared here}}
10 - (void)setObject:(int)object forKeyedSubscript:(id)key; // expected-note {{parameter of type 'int' is declared here}}
15 int i = array[10]; // expected-error {{method for accessing array element must have Objective-C object return type instead of 'int'}}
16 array[2] = i; // expected-error {{cannot assign to this array because assigning method's 2nd parameter of type 'int' is not an Objective-C pointer type}}
18 NSMutableDictionary *dict;
20 val = dict[key]; // expected-error {{method for accessing dictionary element must have Objective-C object return type instead of 'int'}} \
21 // expected-error {{incompatible integer to pointer conversion assigning to 'id' from 'int'}}
22 dict[key] = val; // expected-error {{method object parameter type 'int' is not object type}}