fixes #6489
This commit is contained in:
parent
95a5373d07
commit
8a601669ef
6 changed files with 20 additions and 6 deletions
|
|
@ -525,7 +525,7 @@ proc notNilCheck(tracked: PEffects, n: PNode, paramType: PType) =
|
|||
# addr(x[]) can't be proven, but addr(x) can:
|
||||
if not containsNode(n, {nkDerefExpr, nkHiddenDeref}): return
|
||||
elif (n.kind == nkSym and n.sym.kind in routineKinds) or
|
||||
n.kind in procDefs+{nkObjConstr, nkBracket}:
|
||||
n.kind in procDefs+{nkObjConstr, nkBracket, nkClosure}:
|
||||
# 'p' is not nil obviously:
|
||||
return
|
||||
case impliesNotNil(tracked.guards, n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue