From e3e4cd9fd5fd72264676b8a1d1297751be85d7cf Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 6 Mar 2019 09:26:48 +0100 Subject: [PATCH] make tests green again --- compiler/sempass2.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index 9d46c0b0cf..b23780ed4f 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -543,7 +543,8 @@ proc notNilCheck(tracked: PEffects, n: PNode, paramType: PType) = 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, nkStrLit..nkTripleStrLit}) or - (n.kind in nkCallKinds and n[0].kind == nkSym and n[0].sym.magic == mArrToSeq): + (n.kind in nkCallKinds and n[0].kind == nkSym and n[0].sym.magic == mArrToSeq) or + n.typ.kind == tyTypeDesc: # 'p' is not nil obviously: return case impliesNotNil(tracked.guards, n)