This commit is contained in:
Araq
2015-04-11 09:51:20 +02:00
parent 06feaef64a
commit 28ecf72f79
2 changed files with 7 additions and 3 deletions

View File

@@ -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),

View File

@@ -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