mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
@@ -564,5 +564,9 @@ proc magicsAfterOverloadResolution(c: PContext, n: PNode,
|
||||
if not checkIsolate(n[1]):
|
||||
localError(c.config, n.info, "expression cannot be isolated: " & $n[1])
|
||||
result = n
|
||||
of mPred:
|
||||
if n[1].typ.skipTypes(abstractInst).kind in {tyUInt..tyUInt64}:
|
||||
n[0].sym.magic = mSubU
|
||||
result = n
|
||||
else:
|
||||
result = n
|
||||
|
||||
@@ -59,3 +59,13 @@ discard $(x1,)
|
||||
# bug #13698
|
||||
let n: csize = 1 # xxx should that be csize_t or is that essential here?
|
||||
doAssert $n.int32 == "1"
|
||||
|
||||
# bug #14616
|
||||
|
||||
let limit = 1'u64
|
||||
|
||||
let rangeVar = 0'u64 ..< limit
|
||||
|
||||
doAssert repr(rangeVar) == """[a = 0,
|
||||
b = 0]
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user