* fixes #10807 * use nkAddr instead of nkHiddenAddr
This commit is contained in:
parent
ea3e18bc6c
commit
8ceba8a7f3
6 changed files with 34 additions and 9 deletions
|
|
@ -538,7 +538,7 @@ proc notNilCheck(tracked: PEffects, n: PNode, paramType: PType) =
|
|||
let paramType = paramType.skipTypesOrNil(abstractInst)
|
||||
if paramType != nil and tfNotNil in paramType.flags and
|
||||
n.typ != nil and tfNotNil notin n.typ.flags:
|
||||
if n.kind == nkAddr:
|
||||
if isAddrNode(n):
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue