diff options
author | Araq <rumpf_a@web.de> | 2018-12-05 09:43:34 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-05 09:43:59 +0100 |
commit | 24106ade8fee790fcfbab17d6c7825d79e05c7f3 (patch) | |
tree | 9ff02cf4f0bc3f3047b94802016239d8b037deae /lib/core | |
parent | d21529649746e68fd6f3f955627eda3ee0017534 (diff) | |
download | Nim-24106ade8fee790fcfbab17d6c7825d79e05c7f3.tar.gz |
hotfix: discriminants can be of size 8 bytes [backport]
Diffstat (limited to 'lib/core')
-rw-r--r-- | lib/core/typeinfo.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/core/typeinfo.nim b/lib/core/typeinfo.nim index 14613c50d..cfb8f8f5d 100644 --- a/lib/core/typeinfo.nim +++ b/lib/core/typeinfo.nim @@ -106,6 +106,7 @@ proc getDiscriminant(aa: pointer, n: ptr TNimNode): int = of 1: d = ze(cast[ptr int8](a +% n.offset)[]) of 2: d = ze(cast[ptr int16](a +% n.offset)[]) of 4: d = int(cast[ptr int32](a +% n.offset)[]) + of 8: d = int(cast[ptr int64](a +% n.offset)[]) else: assert(false) return d |