blob: 9f752959e95b68d3fed4c3d720f8af4d5c94d56d [file] [log] [blame]
Fariborz Jahanian4f4fd922010-04-08 00:30:06 +00001// RUN: %clang_cc1 -fsyntax-only -verify %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
14int 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}