mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
fixes #25482
(cherry picked from commit a04f720217)
This commit is contained in:
@@ -803,6 +803,8 @@ proc genNarrow(c: PCtx; n: PNode; dest: TDest) =
|
||||
let first = c.genx(newIntTypeNode(firstOrd(c.config, t), intType))
|
||||
let last = c.genx(newIntTypeNode(lastOrd(c.config, t), intType))
|
||||
c.gABC(n, opcNarrowR, dest, first, last)
|
||||
c.freeTemp(first)
|
||||
c.freeTemp(last)
|
||||
|
||||
proc genNarrowU(c: PCtx; n: PNode; dest: TDest) =
|
||||
let t = skipTypes(n.typ, abstractVar-{tyTypeDesc})
|
||||
|
||||
@@ -821,3 +821,10 @@ proc g1314(_: static bool) = discard
|
||||
proc g1314(_: int) = discard
|
||||
proc y1314() = g1314((; let k = 0; k))
|
||||
y1314()
|
||||
|
||||
proc myProc(first: range[0..100]) =
|
||||
var x = first
|
||||
while x > 0:
|
||||
dec(x)
|
||||
|
||||
const r = (myProc(3); 1)
|
||||
|
||||
Reference in New Issue
Block a user