mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Introduce $vaarg[...] syntax and deprecate the old $vaarg(...).
- Similar change to `$vasplat`: `$vasplat` and `$vasplat[1..]`.
This commit is contained in:
@@ -5,7 +5,7 @@ import std::io;
|
||||
macro test(start, ...)
|
||||
{
|
||||
$for (var $i = 0; $i < $vacount; $i++)
|
||||
for ($vatype($i) i = ($vatype($i))start; i < 5; i+=2)
|
||||
for ($vatype[$i] i = ($vatype[$i])start; i < 5; i+=2)
|
||||
{
|
||||
assert(math::is_even(i));
|
||||
assert(i.is_even());
|
||||
|
||||
Reference in New Issue
Block a user