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