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