summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/conditional-expr-7.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/conditional-expr-7.m')
-rw-r--r--clang/test/SemaObjC/conditional-expr-7.m30
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/conditional-expr-7.m b/clang/test/SemaObjC/conditional-expr-7.m
new file mode 100644
index 0000000..3ddf3d7
--- /dev/null
+++ b/clang/test/SemaObjC/conditional-expr-7.m
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// radar 7682116
+
+@interface Super @end
+
+@interface NSArray : Super @end
+@interface NSSet : Super @end
+
+@protocol MyProtocol
+- (void)myMethod;
+@end
+
+@protocol MyProtocol2 <MyProtocol>
+- (void)myMethod2;
+@end
+
+@interface NSArray() <MyProtocol2>
+@end
+
+@interface NSSet() <MyProtocol>
+@end
+
+int main (int argc, const char * argv[]) {
+ NSArray *array = (void*)0;
+ NSSet *set = (void*)0;
+ id <MyProtocol> instance = (argc) ? array : set;
+ instance = (void*)0;
+ return 0;
+}
+