hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 74bb8047e8db6ddfb0da71f658dad2a0326c4a1c
parent e6b7fff5d99fad70dbdea3da13705d02064f3af7
Author: Sebastian <sebastian@sebsite.pw>
Date:   Thu,  7 Nov 2024 19:08:04 -0500

hare::unparse: fix memory leaks in test

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mhare/unparse/decl.ha | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hare/unparse/decl.ha b/hare/unparse/decl.ha @@ -237,7 +237,7 @@ fn decl_test(d: *ast::decl, expected: str) bool = { symbol = "", ident = ["foo", "bar"], _type = &type_int, - init = alloc(expr_void), + init = &expr_void, }, ast::decl_global { is_const = false, @@ -245,7 +245,7 @@ fn decl_test(d: *ast::decl, expected: str) bool = { symbol = "", ident = ["boo"], _type = &type_int, - init = alloc(expr_void), + init = &expr_void, }, ast::decl_global { is_const = false, @@ -253,7 +253,7 @@ fn decl_test(d: *ast::decl, expected: str) bool = { symbol = "foobar", ident = ["baz"], _type = &type_int, - init = alloc(expr_void), + init = &expr_void, }, ], ... @@ -265,7 +265,7 @@ fn decl_test(d: *ast::decl, expected: str) bool = { ast::decl_const { ident = ["foo"], _type = &type_int, - init = alloc(expr_void), + init = &expr_void, }, ]; assert(decl_test(&d, "export def foo: int = void;"));