JS backend: Array.toList drops first element
marzipankaiser opened this issue · comments
Executing .toList
on an array drops the first element.
Example
For the program:
import mutable/array
def main() = {
val array = arrayFromList([1,2,3]);
println(array.toList)
}
we get the output:
Cons(2, Cons(3, Nil()))
Problem seems to be the >
in the array-to-list conversion here, should be >=
:
effekt/libraries/js/mutable/array.effekt
Lines 52 to 60 in e68b8b3