1 // RUN: %clang_cc1 -Wselector-type-mismatch -verify %s
4 - (id) compare: (char) arg1; // expected-note {{method 'compare:' declared here}}
9 - (id) compare: (id) arg1; // expected-note {{method 'compare:' declared here}}
14 return @selector(compare:); // expected-warning {{several methods with selector 'compare:' of mismatched types are found for the @selector expression}}
17 void Test16458579(void) {
18 SEL s = @selector((retain));
19 SEL s1 = @selector((meth1:));
20 SEL s2 = @selector((retainArgument::));
21 SEL s3 = @selector((retainArgument:::::));
22 SEL s4 = @selector((retainArgument:with:));
23 SEL s5 = @selector((meth1:with:with:));
24 SEL s6 = @selector((getEnum:enum:bool:));
25 SEL s7 = @selector((char:float:double:unsigned:short:long:));
26 SEL s9 = @selector((:enum:bool:));
29 SEL s = @selector(retain);
30 SEL s1 = @selector(meth1:);
31 SEL s2 = @selector(retainArgument::);
32 SEL s3 = @selector(retainArgument:::::);
33 SEL s4 = @selector(retainArgument:with:);
34 SEL s5 = @selector(meth1:with:with:);
35 SEL s6 = @selector(getEnum:enum:bool:);
36 SEL s7 = @selector(char:float:double:unsigned:short:long:);
38 SEL s9 = @selector(:enum:bool:);
41 @interface NSObject @end
45 @interface XBRecipe : NSObject
46 @property (nonatomic, assign) float finalVolume; // expected-note {{method 'setFinalVolume:' declared here}}
49 @interface XBDocument : NSObject
52 @interface XBDocument ()
53 - (void)setFinalVolume:(NSNumber *)finalVolumeNumber; // expected-note {{method 'setFinalVolume:' declared here}}
56 @implementation XBDocument
57 - (void)setFinalVolume:(NSNumber *)finalVolumeNumber
59 (void)@selector(setFinalVolume:); // expected-warning {{several methods with selector 'setFinalVolume:' of mismatched types are found for the @selector expression}}