From 12ab5059a0930bd642db43a96bcaa64f2a3c5327 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 20 Mar 2020 10:46:40 +0100 Subject: make 'nim check' more robust for illdefined constants --- compiler/semexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index cc8854577..c678d3674 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1142,7 +1142,7 @@ proc semSym(c: PContext, n: PNode, sym: PSym, flags: TExprFlags): PNode = # It is clear that ``[]`` means two totally different things. Thus, we # copy `x`'s AST into each context, so that the type fixup phase can # deal with two different ``[]``. - if s.ast.len == 0: result = inlineConst(c, n, s) + if s.ast.safeLen == 0: result = inlineConst(c, n, s) else: result = newSymNode(s, n.info) of tyStatic: if typ.n != nil: -- cgit 1.4.1-2-gfad0