mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 22:33:49 +00:00
fixes #6710
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user