Merge branch 'devel' into sighashes

This commit is contained in:
Araq 2016-12-19 11:35:45 +01:00
commit 237252f90c
14 changed files with 115 additions and 25 deletions

View file

@ -769,7 +769,7 @@ proc getConstExpr(m: PSym, n: PNode): PNode =
of nkCast:
var a = getConstExpr(m, n.sons[1])
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:
result = a
result.typ = n.typ