mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-01 19:44:44 +00:00
fixes #3993
This commit is contained in:
@@ -525,7 +525,8 @@ 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, nkClosure}:
|
||||
(n.kind in procDefs+{nkObjConstr, nkBracket, nkClosure}) or
|
||||
(n.kind in nkCallKinds and n[0].kind == nkSym and n[0].sym.magic == mArrToSeq):
|
||||
# 'p' is not nil obviously:
|
||||
return
|
||||
case impliesNotNil(tracked.guards, n)
|
||||
|
||||
Reference in New Issue
Block a user