mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Error when using $vaarg/$vacount/$vasplat and similar in a macro without vaargs #2510.
This commit is contained in:
14
test/test_suite/macros/macro_vaarg_no.c3
Normal file
14
test/test_suite/macros/macro_vaarg_no.c3
Normal file
@@ -0,0 +1,14 @@
|
||||
import std;
|
||||
|
||||
macro void example(String... x)
|
||||
{
|
||||
$for var $i = 0; $i < $vacount; $i++: // #error: can only be used inside of a macro with untyped
|
||||
io::printn($vaarg[$i]);
|
||||
$endfor
|
||||
}
|
||||
|
||||
fn void main()
|
||||
{
|
||||
example();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user