overloading resolution for getAst; breaking change
This commit is contained in:
parent
242fb3240f
commit
aa4260ffa8
5 changed files with 44 additions and 18 deletions
|
|
@ -324,8 +324,8 @@ macro check*(conditions: untyped): untyped =
|
|||
|
||||
case checked.kind
|
||||
of nnkCallKinds:
|
||||
template rewrite(call, lineInfoLit: expr, callLit: string,
|
||||
argAssgs, argPrintOuts: stmt): stmt =
|
||||
template rewrite(call, lineInfoLit, callLit,
|
||||
argAssgs, argPrintOuts) =
|
||||
block:
|
||||
argAssgs #all callables (and assignments) are run here
|
||||
if not call:
|
||||
|
|
@ -345,8 +345,8 @@ macro check*(conditions: untyped): untyped =
|
|||
result.add(newCall(!"check", checked[i]))
|
||||
|
||||
else:
|
||||
template rewrite(Exp, lineInfoLit: expr, expLit: string): stmt =
|
||||
if not Exp:
|
||||
template rewrite(exp, lineInfoLit, expLit) =
|
||||
if not exp:
|
||||
checkpoint(lineInfoLit & ": Check failed: " & expLit)
|
||||
fail()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue