1 /* Check if finding multiple signatures for a method is handled gracefully. */
2 /* Author: Ziemowit Laski <zlaski@apple.com> */
4 /* { dg-do compile } */
5 /* { dg-options "-Wstrict-selector-match" } */
7 #include <objc/Object.h>
10 - (void)setWindow:(Object *)wdw;
14 - (void)setWindow:(Class1 *)window;
18 Object *obj = [[Object alloc] init];
20 [obj setWindow:nil]; /* { dg-warning ".Object. may not respond to .\\-setWindow:." } */
21 /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 20 } */
22 /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 20 } */
23 /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 20 } */
24 [obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
25 /* { dg-warning "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 10 } */
26 /* { dg-warning "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 14 } */