parent
b2a1944587
commit
a3a87cdb29
2 changed files with 14 additions and 0 deletions
|
|
@ -564,5 +564,9 @@ proc magicsAfterOverloadResolution(c: PContext, n: PNode,
|
||||||
if not checkIsolate(n[1]):
|
if not checkIsolate(n[1]):
|
||||||
localError(c.config, n.info, "expression cannot be isolated: " & $n[1])
|
localError(c.config, n.info, "expression cannot be isolated: " & $n[1])
|
||||||
result = n
|
result = n
|
||||||
|
of mPred:
|
||||||
|
if n[1].typ.skipTypes(abstractInst).kind in {tyUInt..tyUInt64}:
|
||||||
|
n[0].sym.magic = mSubU
|
||||||
|
result = n
|
||||||
else:
|
else:
|
||||||
result = n
|
result = n
|
||||||
|
|
|
||||||
|
|
@ -59,3 +59,13 @@ discard $(x1,)
|
||||||
# bug #13698
|
# bug #13698
|
||||||
let n: csize = 1 # xxx should that be csize_t or is that essential here?
|
let n: csize = 1 # xxx should that be csize_t or is that essential here?
|
||||||
doAssert $n.int32 == "1"
|
doAssert $n.int32 == "1"
|
||||||
|
|
||||||
|
# bug #14616
|
||||||
|
|
||||||
|
let limit = 1'u64
|
||||||
|
|
||||||
|
let rangeVar = 0'u64 ..< limit
|
||||||
|
|
||||||
|
doAssert repr(rangeVar) == """[a = 0,
|
||||||
|
b = 0]
|
||||||
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue