This commit is contained in:
Andreas Rumpf
2017-11-08 15:45:26 +01:00
parent 30f97b7a84
commit 46275f6b8f
2 changed files with 5 additions and 1 deletions

View File

@@ -1518,7 +1518,7 @@ proc delete*[T](x: var seq[T], i: Natural) {.noSideEffect.} =
## i.delete(2) #=> @[1, 2, 4, 5]
template defaultImpl =
let xl = x.len
for j in i..xl-2: shallowCopy(x[j], x[j+1])
for j in i.int..xl-2: shallowCopy(x[j], x[j+1])
setLen(x, xl-1)
when nimvm:

View File

@@ -16,3 +16,7 @@ doAssert high(uint32) > low(uint32)
doAssert high(float) > low(float)
doAssert high(float32) > low(float32)
doAssert high(float64) > low(float64)
# bug #6710
var s = @[1]
s.delete(0)