The following code tests a buggy behaviour when indexing slices. The .Index code will allow you to index 1(?) past the formal length of the slice when there should have been an error. This is easy to fix but it causes a bunch of the internal uses of ^Slice to break. It all needs to be fixed and the slice code needs to be simplified/clarified.
(test/exec :slice36
(\ ->
(let s (slice [1 2 3 4] 1 -1))
[ (!! s 0) (!! s 1) (!! s 2) ] ; indexing 2 here should throw an exception
)
[2 3 4]
)
The following code tests a buggy behaviour when indexing slices. The
.Indexcode will allow you to index 1(?) past the formal length of the slice when there should have been an error. This is easy to fix but it causes a bunch of the internal uses of^Sliceto break. It all needs to be fixed and the slice code needs to be simplified/clarified.