diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-04-08 00:56:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 09:56:16 +0200 |
commit | 95fd8ae93ce8732eb5a979d4cd63e0350594318d (patch) | |
tree | 1a8d717554343e4bd962fb26340cbf6915c1a9b1 /compiler/ccgexprs.nim | |
parent | 3036ec9c4456f6a5edb0a5bbfbb3e3c79fba7d23 (diff) | |
download | Nim-95fd8ae93ce8732eb5a979d4cd63e0350594318d.tar.gz |
fix #13902 distinct uint64 type corruption on 32-bit with borrow (#13907) [backport:1.2]
* fix #13902 distinct uint64 type corruption on 32-bit with borrow Co-authored-by: Timothee Cour <timothee.cour2+lightsail@gmail.com>
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r-- | compiler/ccgexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index fcedcf001..d8f5d016b 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -2156,7 +2156,7 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) = const opr: array[mInc..mDec, string] = ["+=", "-="] const fun64: array[mInc..mDec, string] = ["nimAddInt64", "nimSubInt64"] const fun: array[mInc..mDec, string] = ["nimAddInt","nimSubInt"] - let underlying = skipTypes(e[1].typ, {tyGenericInst, tyAlias, tySink, tyVar, tyLent, tyRange}) + let underlying = skipTypes(e[1].typ, {tyGenericInst, tyAlias, tySink, tyVar, tyLent, tyRange, tyDistinct}) if optOverflowCheck notin p.options or underlying.kind in {tyUInt..tyUInt64}: binaryStmt(p, e, d, opr[op]) else: |