Skip to content

Commit

Permalink
Update $vaarg
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Feb 1, 2025
1 parent f6105bd commit bff46a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/docs/FAQ/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ We can now create a macro method on `Obj` which compiles to different calls depe
macro void Obj.func(&self, ...)
{
// Does it have a single argument of type 'Foo*'?
$if $vacount == 1 && @typeis($vaarg(0), Foo*):
$if $vacount == 1 && @typeis($vaarg[0], Foo*):
// If so, dispatch to func2
return self.func2($vaarg(0));
return self.func2($vaarg[0]);
$else
// Otherwise, dispatch all varargs to func1
return self.func1($vasplat());
return self.func1($vasplat);
$endif
}
```
Expand Down

0 comments on commit bff46a0

Please sign in to comment.