New approach

This commit is contained in:
cooldome 2018-06-12 00:20:08 +01:00
commit 1b7cf3df51
3 changed files with 27 additions and 32 deletions

View file

@ -77,7 +77,7 @@ proc checkTypes(c: PPatternContext, p: PSym, n: PNode): bool =
if isNil(n.typ):
result = p.typ.kind in {tyVoid, tyStmt}
else:
result = sigmatch.argtypeMatches(c.c, p.typ, n.typ)
result = sigmatch.argtypeMatches(c.c, p.typ, n.typ, from_hlo = true)
proc isPatternParam(c: PPatternContext, p: PNode): bool {.inline.} =
result = p.kind == nkSym and p.sym.kind == skParam and p.sym.owner == c.owner