Don't use Str.concat in an example

This commit is contained in:
Richard Feldman 2025-11-10 21:10:34 -05:00
parent b291ef3bce
commit bc8394f2b6
No known key found for this signature in database

View file

@ -1825,9 +1825,9 @@ test "List.fold works as builtin associated item" {
const source =
\\Test := [].{}
\\
\\x = List.fold(["a", "b", "c"], "", |acc, item| Str.concat(acc, item))
\\x = List.fold([1, 2, 3], 0, |acc, item| acc + item)
;
try checkTypesModule(source, .{ .pass = .{ .def = "x" } }, "Str");
try checkTypesModule(source, .{ .pass = .{ .def = "x" } }, "Num(_size)");
}
test "associated item: type annotation followed by body should not create duplicate definition" {