fixes nimsuggest issue #40
This commit is contained in:
parent
bda8a6c1b7
commit
a88a965c6d
1 changed files with 1 additions and 1 deletions
|
|
@ -768,7 +768,7 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
|
||||||
of nkCast:
|
of nkCast:
|
||||||
var a = getConstExpr(m, n.sons[1])
|
var a = getConstExpr(m, n.sons[1])
|
||||||
if a == nil: return
|
if a == nil: return
|
||||||
if n.typ.kind in NilableTypes:
|
if n.typ != nil and n.typ.kind in NilableTypes:
|
||||||
# we allow compile-time 'cast' for pointer types:
|
# we allow compile-time 'cast' for pointer types:
|
||||||
result = a
|
result = a
|
||||||
result.typ = n.typ
|
result.typ = n.typ
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue