diff options
Diffstat (limited to 'tests/macros/tgetimpl.nim')
-rw-r--r-- | tests/macros/tgetimpl.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/macros/tgetimpl.nim b/tests/macros/tgetimpl.nim index 398957672..ab33131b0 100644 --- a/tests/macros/tgetimpl.nim +++ b/tests/macros/tgetimpl.nim @@ -50,8 +50,6 @@ static: doAssert isSameOwner(poo, dummyproc) == false wrappedScope() -#--------------------------------------------------------------- - macro check_gen_proc(ex: typed): (bool, bool) = let lenChoice = bindsym"len" var is_equal = false @@ -75,7 +73,9 @@ assert: check_gen_proc(len(a)) == (false, true) macro check(x: type): untyped = let z = getType(x) let y = getImpl(z[1]) - let sym = if y[0].kind == nnkSym: y[0] else: y[0][0] + var sym = y[0] + if sym.kind == nnkPragmaExpr: sym = sym[0] + if sym.kind == nnkPostfix: sym = sym[1] expectKind(z[1], nnkSym) expectKind(sym, nnkSym) expectKind(y[2], nnkObjectTy) |