mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Support @param directives for ... parameters. #2578
This commit is contained in:
21
test/test_suite/contracts/ellipsis_param.c3
Normal file
21
test/test_suite/contracts/ellipsis_param.c3
Normal file
@@ -0,0 +1,21 @@
|
||||
module foo;
|
||||
import std;
|
||||
|
||||
<* @param [in] ... : "ofkeofek" *> // #error: may not have any in-out modifiers
|
||||
extern fn void test2(...);
|
||||
|
||||
<* @param ... : "ofkeofek" *>
|
||||
extern fn void test(...);
|
||||
|
||||
<* @param ... : "ofkeofek" *> // #error: are only allowed macros and functions with
|
||||
extern fn void test3();
|
||||
|
||||
<*
|
||||
@param ... : "ofkeofek"
|
||||
@param ... : "ofkeofek" *> // #error: @param may not be repeated
|
||||
extern fn void test4(...);
|
||||
|
||||
fn int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user