mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Error message for missing arg incorrect for methods with zero args #2296.
This commit is contained in:
10
test/test_suite/methods/method_error_args.c3
Normal file
10
test/test_suite/methods/method_error_args.c3
Normal file
@@ -0,0 +1,10 @@
|
||||
module test;
|
||||
import std;
|
||||
|
||||
fn void String.hello(self, int a, int b) {}
|
||||
fn void main()
|
||||
{
|
||||
String s = "foek";
|
||||
s.hello(); // #error: 'hello' expects 2 parameter(s), but none was provided
|
||||
s.hello(1); // #error: 1 more argument was expected after this one, did you forget it?
|
||||
}
|
||||
Reference in New Issue
Block a user