effekt icon indicating copy to clipboard operation
effekt copied to clipboard

array.put should not auto resize the array

Open IR0NSIGHT opened this issue 1 year ago • 0 comments

unexpected behaviour: at the moment: array of size n allows array.put(n, x) and will autoresize to n+1 length expected behaviour: array.put(i, n) throws "array index out of bounds" or similar error

def main() = region r {
    val arr = emptyArray(0);
    put(arr,10, 1);
    println(arr)   //,,,,,,,,,,1
}

IR0NSIGHT avatar Oct 10 '23 10:10 IR0NSIGHT