diff options
author | Araq <rumpf_a@web.de> | 2014-08-10 03:19:00 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-10 03:19:00 +0200 |
commit | 037d7e4e5d3f142fb8486895820c70cf2e1cf641 (patch) | |
tree | 6e47c4b4029b9c57d00e3b2d5ff9f6ea5f3e0eda /compiler/semexprs.nim | |
parent | 86b654c58c610df1157538da3e3a86cbbdb4fb99 (diff) | |
parent | 0f15ebf8cad19d4f0c1953c789ff46bcb7306085 (diff) | |
download | Nim-037d7e4e5d3f142fb8486895820c70cf2e1cf641.tar.gz |
Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index b81d53d41..7e97eb293 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -199,6 +199,8 @@ proc isCastable(dst, src: PType): bool = result = (dstSize >= srcSize) or (skipTypes(dst, abstractInst).kind in IntegralTypes) or (skipTypes(src, abstractInst-{tyTypeDesc}).kind in IntegralTypes) + if result and src.kind == tyNil: + result = dst.size <= platform.ptrSize proc isSymChoice(n: PNode): bool {.inline.} = result = n.kind in nkSymChoices |