summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/protocol-lookup-2.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/protocol-lookup-2.m')
-rw-r--r--clang/test/SemaObjC/protocol-lookup-2.m33
1 files changed, 33 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/protocol-lookup-2.m b/clang/test/SemaObjC/protocol-lookup-2.m
new file mode 100644
index 0000000..bf07523
--- /dev/null
+++ b/clang/test/SemaObjC/protocol-lookup-2.m
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+@interface NSObject @end
+
+@protocol ProtocolA
+
++ (id)classMethod;
+- (id)instanceMethod;
+
+@end
+
+@protocol ProtocolB <ProtocolA>
+
+@end
+
+@interface Foo : NSObject <ProtocolB>
+
+@end
+
+@interface SubFoo : Foo
+
+@end
+
+@implementation SubFoo
+
++ (id)method {
+ return [super classMethod];
+}
+
+- (id)method {
+ return [super instanceMethod];
+}
+
+@end