From 97056fbb9bd75a6fcf33f8bd0cb9b88f075bbb51 Mon Sep 17 00:00:00 2001 From: alaviss Date: Sun, 6 May 2018 15:34:22 +0700 Subject: [PATCH] fixes #7774 (#7783) --- compiler/vmgen.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index f7d3237b8..7f91e63db 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -1554,7 +1554,7 @@ proc getNullValue(typ: PType, info: TLineInfo): PNode = of tyCString, tyString: result = newNodeIT(nkStrLit, info, t) result.strVal = "" - of tyVar, tyLent, tyPointer, tyPtr, tySequence, tyExpr, + of tyVar, tyLent, tyPointer, tyPtr, tyExpr, tyStmt, tyTypeDesc, tyStatic, tyRef, tyNil: result = newNodeIT(nkNilLit, info, t) of tyProc: @@ -1585,6 +1585,8 @@ proc getNullValue(typ: PType, info: TLineInfo): PNode = result = newNodeIT(nkCurly, info, t) of tyOpt: result = newNodeIT(nkNilLit, info, t) + of tySequence: + result = newNodeIT(nkBracket, info, t) else: globalError(info, "cannot create null element for: " & $t.kind)