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