insert_at incorrectly prevented inserts at the end of a list.

This commit is contained in:
Christoffer Lerno
2024-08-19 11:44:06 +02:00
parent 6de17b9ae9
commit 476a6424ee
2 changed files with 2 additions and 1 deletions

View File

@@ -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)
{

View File

@@ -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