mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 04:02:41 +00:00
13 lines
371 B
Nim
13 lines
371 B
Nim
import std/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
|
|
|
|
block: # bug #17454
|
|
proc f(v: NimNode): string {.raises: [].} = $v
|