make 'nim check' more robust for illdefined constants
This commit is contained in:
parent
70d93636cb
commit
12ab5059a0
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
# 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
|
# copy `x`'s AST into each context, so that the type fixup phase can
|
||||||
# deal with two different ``[]``.
|
# 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)
|
else: result = newSymNode(s, n.info)
|
||||||
of tyStatic:
|
of tyStatic:
|
||||||
if typ.n != nil:
|
if typ.n != nil:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue