blob: 107b7a54843d133627fcafb4764b4795a5bf9866 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -rewrite-objc -o - %s
Chris Lattner514b24c2008-05-23 23:29:33 +00002// rdar://5950938
3@interface NSArray {}
4+ (id)arrayWithObjects:(id)firstObj, ...;
5@end
6
7@interface NSConstantString {}
8@end
9
10int main() {
11 id foo = [NSArray arrayWithObjects:@"1", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", @"10", @"11", @"12", 0];
12 return 0;
13}
14
Steve Naroffcda658e2008-11-19 21:15:47 +000015// rdar://6291588
16@protocol A
17@end
18
19@interface Foo
20@end
21
22void func() {
23 id <A> obj = (id <A>)[Foo bar];
24}
25