The following panics with a use after free. It doesn’t panic when the accum is initialized with [] instead.
main! = || {
_x = [""].fold(List.with_capacity(1), List.append)
}
More details in issue https://github.com/roc-lang/roc/issues/8667
Last updated: Dec 21 2025 at 12:15 UTC