blob: 7908d9fea5e28113b3d678a20ce15430ade0e2c8 [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -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