mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
* 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>
10 lines
297 B
Nim
10 lines
297 B
Nim
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
|