diff options
author | Andrey R (cooldome) <ariabushenko@gmail.com> | 2020-11-17 18:54:33 +0000 |
---|---|---|
committer | Andrey R (cooldome) <ariabushenko@gmail.com> | 2020-11-17 18:54:33 +0000 |
commit | 632af8afad92594da050a5f7fd784ea111c3cc54 (patch) | |
tree | bd6e2eb89f809bd8270c25e39b39672519b4a5a9 /compiler | |
parent | 1663ad77e3398fec0b5d6b00516f91565ce12cce (diff) | |
download | Nim-632af8afad92594da050a5f7fd784ea111c3cc54.tar.gz |
Revert "follow #16009 VM supports cast nil to ptr (#16012)"
This reverts commit fec19c980e36e62747eb119f0740cb785e858ac3.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/vmgen.nim | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index 069b8cbf5..bcb7faa47 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -901,9 +901,6 @@ proc genCastIntFloat(c: PCtx; n: PNode; dest: var TDest) = c.gABx(n, opcSetType, dest, c.genType(dst)) c.gABC(n, opcCastIntToPtr, dest, tmp) c.freeTemp(tmp) - elif src.kind == tyNil and dst.kind in PtrLikeKinds: - if dest < 0: dest = c.getTemp(n[0].typ) - genLit(c, n[1], dest) else: # todo: support cast from tyInt to tyRef globalError(c.config, n.info, "VM does not support 'cast' from " & $src.kind & " to " & $dst.kind) |