mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
fix memory leak in List.concat
This commit is contained in:
parent
212dfdf842
commit
0af11c210e
2 changed files with 22 additions and 5 deletions
|
@ -294,3 +294,20 @@ fn str_trim_left_capacity() {
|
|||
"#
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn str_concat_later_referencing_empty_list_with_capacity() {
|
||||
valgrind_test(indoc!(
|
||||
r#"
|
||||
(
|
||||
a : List U8
|
||||
a = List.withCapacity 1
|
||||
|
||||
List.concat a [58]
|
||||
|> List.len
|
||||
|> Num.addWrap (List.len a)
|
||||
|> Num.toStr
|
||||
)
|
||||
"#
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue