blob: ebc7192f0f5af4125e473bf2962f07db1db483d4 [file] [log] [blame]
Fariborz Jahanian56242ba2012-06-21 18:43:08 +00001// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-declarations -verify -Wno-objc-root-class %s
Fariborz Jahanian4f4fd922010-04-08 00:30:06 +00002
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}