Error when using $vaarg/$vacount/$vasplat and similar in a macro without vaargs #2510.

This commit is contained in:
Christoffer Lerno
2025-10-06 00:45:36 +02:00
parent e9ec421b3b
commit 5a1831c989
5 changed files with 22 additions and 5 deletions

View 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();
}