diff options
Diffstat (limited to 'compiler/sigmatch.nim')
-rwxr-xr-x | compiler/sigmatch.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 8f1ca5f36..cfae74119 100755 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -637,8 +637,12 @@ proc ParamTypesMatchAux(c: PContext, m: var TCandidate, f, a: PType, of isGeneric: inc(m.genericMatches) if m.calleeSym != nil and m.calleeSym.kind in {skMacro, skTemplate}: - if f.kind == tyTypeDesc: result = arg - else: result = argOrig + if f.kind == tyStmt and argOrig.kind == nkDo: + result = argOrig[bodyPos] + elif f.kind == tyTypeDesc: + result = arg + else: + result = argOrig else: result = copyTree(arg) result.typ = getInstantiatedType(c, arg, m, f) |