summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2020-03-20 10:46:40 +0100
committerAraq <rumpf_a@web.de>2020-03-20 10:46:40 +0100
commit12ab5059a0930bd642db43a96bcaa64f2a3c5327 (patch)
tree568b51dc406439177ddcce729584912ce636a209 /compiler
parent70d93636cb85a5397fe9efcd463e6e39eb20501c (diff)
downloadNim-12ab5059a0930bd642db43a96bcaa64f2a3c5327.tar.gz
make 'nim check' more robust for illdefined constants
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim2
1 files changed, 1 insertions, 1 deletions
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: