1 | // RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-declarations -verify -Wno-objc-root-class %s |
2 | |
3 | @interface Foo |
4 | - (id)test:(id)one, id two; |
5 | - (id)bad:(id)one, id two, double three; |
6 | @end |
7 | |
8 | @implementation Foo |
9 | - (id)test:(id )one, id two {return two; } |
10 | - (id)bad:(id)one, id two, double three { return two; } |
11 | @end |
12 | |
13 | |
14 | int main() { |
15 | Foo *foo; |
16 | [foo test:@"One", @"Two"]; |
17 | [foo bad:@"One", @"Two"]; // expected-error {{too few arguments to method call}} |
18 | [foo bad:@"One", @"Two", 3.14]; |
19 | [foo bad:@"One", @"Two", 3.14, @"Two"]; // expected-error {{too many arguments to method call}} |
20 | } |
21 | |