mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Compiler assert with typed macro vaargs accessing a macro passed as vaarg #2498
This commit is contained in:
16
test/test_suite/functions/vaarg_no_name_macro.c3
Normal file
16
test/test_suite/functions/vaarg_no_name_macro.c3
Normal file
@@ -0,0 +1,16 @@
|
||||
module test;
|
||||
import std;
|
||||
fn int main(String[] args)
|
||||
{
|
||||
test2(test1(1));
|
||||
return 0;
|
||||
}
|
||||
|
||||
macro String test1(a) => "abc";
|
||||
|
||||
macro test2(String...) // #error: must have a parameter name
|
||||
{
|
||||
$for var $i = 0; $i < $vacount; $i++:
|
||||
io::printfn($vaarg[$i]);
|
||||
$endfor
|
||||
}
|
||||
Reference in New Issue
Block a user