Stream: bugs

Topic: List.concat bug in function


view this post on Zulip Fabian Schmalzried (Dec 10 2025 at 16:20):

app [main!] { pf: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.5/BJBzo2SR2o5w3StmubGWvnPHq6hfePMaNWy5MwkPuZUs.tar.zst" }

import pf.Stdout

main! = |_| {
    var line = "abc"
    test(line)
    Ok({})
}

test = |line| {
    bytes = line.to_utf8()
    dbg bytes
    foo = List.concat([0], bytes)
    dbg foo
}

output:

dbg: [97, 98, 99]
dbg: [0, 0.000000000006513249, 0, 0]

Strangely inlining the test function results in the expected output.
Should I create a gh issue?

view this post on Zulip Anton (Dec 10 2025 at 16:39):

yes please :)

view this post on Zulip Fabian Schmalzried (Dec 10 2025 at 17:45):

#8618


Last updated: Dec 21 2025 at 12:15 UTC