blob: d37b5897b1140cd37f3811eae425fbde03d88ce1 [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -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}