1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s 3 // rdar://10667659 4 5 @protocol NSCopying @end 6 7 @interface NSString <NSCopying> 8 @end 9 10 void takeId(id test) {} 11 12 void takeCopyableId(id<NSCopying> test) {} 13 14 id<NSCopying> Test () { 15 NSString const *constantString = @"Test"; 16 takeId(constantString); 17 takeCopyableId(constantString); 18 id ID = constantString; 19 id<NSCopying> IDQNSCopying = constantString; 20 return constantString; 21 } 22