diff --git a/lib/std/collections/list.c3 b/lib/std/collections/list.c3 index c6e47ffcb..435aafc65 100644 --- a/lib/std/collections/list.c3 +++ b/lib/std/collections/list.c3 @@ -240,7 +240,7 @@ fn void List.push_front(&self, Type type) @inline } /** - * @require index < self.size + * @require index <= self.size **/ fn void List.insert_at(&self, usz index, Type type) { diff --git a/releasenotes.md b/releasenotes.md index 411073ed8..c1b3583d0 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -79,6 +79,7 @@ - Bug converting untyped list #1360. - Benchmark / test no longer suppresses debug info. #1364. - Bug when compile time subtracting a distinct type. +- `insert_at` incorrectly prevented inserts at the end of a list. ### Stdlib changes