When trying to access elements of a list with the type of the index inferred, the program panic crashes.
main! = || {
list = [""]
#indices : List(U64) # <- does not crash with this type annotation
indices = [0]
for i in indices {
_x = List.get(list, i)
}
}
I’ve opened an issue for this: https://github.com/roc-lang/roc/issues/8666
Last updated: Dec 21 2025 at 12:15 UTC