aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-08-03 18:21:12 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-08-03 18:21:12 +0000
commit74133075f5024ce87e4c1eb644d77c20e1c521f4 (patch)
tree726710578f2a5513ef1fe6080dd2d028f738fb75 /test
parent43fd9388d374f29e908e611a686c6137553efa79 (diff)
objective-c: Methods declared in methods must type match
those declated in its protocols. First half or // rdar://6191214 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/SemaObjC/class-protocol-method-match.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaObjC/class-protocol-method-match.m b/test/SemaObjC/class-protocol-method-match.m
index be1c1e03f3..bffdb79e07 100644
--- a/test/SemaObjC/class-protocol-method-match.m
+++ b/test/SemaObjC/class-protocol-method-match.m
@@ -44,3 +44,21 @@
- (void) bak {}
@end
+// rdar://6911214
+@protocol Xint
+-(void) setX: (int) arg0; // expected-note {{previous definition is here}}
++(void) setX: (int) arg0; // expected-note {{previous definition is here}}
+@end
+
+@interface A <Xint>
+@end
+
+@interface C : A
+-(void) setX: (C*) arg0; // expected-warning {{conflicting parameter types in declaration of 'setX:': 'int' vs 'C *'}}
++(void) setX: (C*) arg0; // expected-warning {{conflicting parameter types in declaration of 'setX:': 'int' vs 'C *'}}
+@end
+
+@implementation C
+-(void) setX: (C*) arg0 {}
++(void) setX: (C*) arg0 {}
+@end