From ce23f97a97e6ba18cc0e56b935592b30590f9b4e Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:10:07 +0800 Subject: [PATCH] fixes `system.delete` that raises defects --- lib/system.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system.nim b/lib/system.nim index 8d1cda86815e3..1d81c3f22a4b3 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -1981,7 +1981,7 @@ when defined(nimAuditDelete): else: {.pragma: auditDelete.} -proc delete*[T](x: var seq[T], i: Natural) {.noSideEffect, auditDelete.} = +proc delete*[T](x: var seq[T], i: Natural) {.noSideEffect, systemRaisesDefect, auditDelete.} = ## Deletes the item at index `i` by moving all `x[i+1..^1]` items by one position. ## ## This is an `O(n)` operation.