mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes #2498
This commit is contained in:
@@ -1587,8 +1587,6 @@ proc genRangeChck(p: BProc, n: PNode, d: var TLoc, magic: string) =
|
||||
[getTypeDesc(p.module, dest), rdCharLoc(a)])
|
||||
else:
|
||||
initLocExpr(p, n.sons[0], a)
|
||||
if not leValue(n.sons[1], n.sons[2]):
|
||||
internalError(n.info, "range check will always fail; empty range")
|
||||
putIntoDest(p, d, dest, ropecg(p.module, "(($1)#$5($2, $3, $4))", [
|
||||
getTypeDesc(p.module, dest), rdCharLoc(a),
|
||||
genLiteral(p, n.sons[1], dest), genLiteral(p, n.sons[2], dest),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
discard """
|
||||
output: '''true'''
|
||||
output: '''true
|
||||
true'''
|
||||
"""
|
||||
|
||||
# bug #2489
|
||||
@@ -7,3 +8,8 @@ discard """
|
||||
let a = [1]
|
||||
let b = [1]
|
||||
echo a == b
|
||||
|
||||
# bug #2498
|
||||
var x: array[0, int]
|
||||
var y: array[0, int]
|
||||
echo x == y
|
||||
|
||||
Reference in New Issue
Block a user