1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuctypedef unsigned int size_t; 4*f4a2713aSLionel Sambuc@protocol P @end 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc@interface NSMutableArray 7*f4a2713aSLionel Sambuc@end 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@interface XNSMutableArray 10*f4a2713aSLionel Sambuc@end 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambucint main() { 13*f4a2713aSLionel Sambucid array; 14*f4a2713aSLionel Sambucid oldObject = array[10]; // expected-warning {{instance method '-objectAtIndexedSubscript:' not found (return type defaults to 'id')}} 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambucarray[10] = 0; // expected-warning {{instance method '-setObject:atIndexedSubscript:' not found (return type defaults to 'id')}} 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambucid<P> p_array; 19*f4a2713aSLionel SambucoldObject = p_array[10]; // expected-warning {{instance method '-objectAtIndexedSubscript:' not found (return type defaults to 'id')}} 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambucp_array[10] = 0; // expected-warning {{instance method '-setObject:atIndexedSubscript:' not found (return type defaults to 'id')}} 22*f4a2713aSLionel Sambuc} 23*f4a2713aSLionel Sambuc 24