diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-08-07 15:53:16 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-07 15:53:16 +0200 |
commit | afbcd1b330f16294cee32efca1b2f9060874a497 (patch) | |
tree | d0406792478fa58d3c487ff6f72f999c29f25343 /compiler/lowerings.nim | |
parent | 8407a574992ebd6bccec647a902cf54a4de8db18 (diff) | |
download | Nim-afbcd1b330f16294cee32efca1b2f9060874a497.tar.gz |
int128 on firstOrd, lastOrd and lengthOrd (#11701)
* fixes #11847
Diffstat (limited to 'compiler/lowerings.nim')
-rw-r--r-- | compiler/lowerings.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim index 727b88760..9ff3ece33 100644 --- a/compiler/lowerings.nim +++ b/compiler/lowerings.nim @@ -330,7 +330,7 @@ proc newIntLit*(g: ModuleGraph; info: TLineInfo; value: BiggestInt): PNode = proc genHigh*(g: ModuleGraph; n: PNode): PNode = if skipTypes(n.typ, abstractVar).kind == tyArray: - result = newIntLit(g, n.info, lastOrd(g.config, skipTypes(n.typ, abstractVar))) + result = newIntLit(g, n.info, toInt64(lastOrd(g.config, skipTypes(n.typ, abstractVar)))) else: result = newNodeI(nkCall, n.info, 2) result.typ = getSysType(g, n.info, tyInt) @@ -339,7 +339,7 @@ proc genHigh*(g: ModuleGraph; n: PNode): PNode = proc genLen*(g: ModuleGraph; n: PNode): PNode = if skipTypes(n.typ, abstractVar).kind == tyArray: - result = newIntLit(g, n.info, lastOrd(g.config, skipTypes(n.typ, abstractVar)) + 1) + result = newIntLit(g, n.info, toInt64(lastOrd(g.config, skipTypes(n.typ, abstractVar)) + 1)) else: result = newNodeI(nkCall, n.info, 2) result.typ = getSysType(g, n.info, tyInt) |