mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-22 23:35:22 +00:00
fixed system.delete (#18507)
This commit is contained in:
@@ -53,8 +53,8 @@ template main =
|
||||
var s = @["foo", "bar"]
|
||||
s.delete(1)
|
||||
doAssert s == @["foo"]
|
||||
|
||||
block:
|
||||
|
||||
when false:
|
||||
var s: seq[string]
|
||||
doAssertRaises(IndexDefect):
|
||||
s.delete(0)
|
||||
@@ -66,8 +66,8 @@ template main =
|
||||
var s = @["foo"]
|
||||
s.delete(0)
|
||||
doAssert s == @[]
|
||||
|
||||
block: # bug #16544: deleting out of bounds index should raise
|
||||
|
||||
when false: # bug #16544: deleting out of bounds index should raise
|
||||
var s = @["foo"]
|
||||
doAssertRaises(IndexDefect):
|
||||
s.delete(1)
|
||||
|
||||
Reference in New Issue
Block a user