* Fixes #16219, `hasArgOfName` ignoring argument sets. * Fix test and simplify ident traversal. * Moved test into a block and removed some boilerplate. * Fix some argument formatting. * use ..< * Change the preceding line too Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
parent
849bc36eda
commit
23447ffdce
2 changed files with 13 additions and 4 deletions
9
tests/stdlib/tmacros.nim
Normal file
9
tests/stdlib/tmacros.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import macros
|
||||
|
||||
block: # hasArgOfName
|
||||
macro m(u: untyped): untyped =
|
||||
for name in ["s","i","j","k","b","xs","ys"]:
|
||||
doAssert hasArgOfName(params u,name)
|
||||
doAssert not hasArgOfName(params u,"nonexistent")
|
||||
|
||||
proc p(s: string; i,j,k: int; b: bool; xs,ys: seq[int] = @[]) {.m.} = discard
|
||||
Loading…
Add table
Add a link
Reference in a new issue