From: Brendan Hansen Date: Tue, 12 Oct 2021 03:38:05 +0000 (-0500) Subject: actually fixed array literals X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=f9f0fb2d073ffec2b1cdb7143b7c4033aefddaf9;p=onyx.git actually fixed array literals --- diff --git a/bin/onyx b/bin/onyx index bda45c07..9ea715f6 100755 Binary files a/bin/onyx and b/bin/onyx differ diff --git a/src/astnodes.c b/src/astnodes.c index 2d1f1e8b..1c82e901 100644 --- a/src/astnodes.c +++ b/src/astnodes.c @@ -543,6 +543,8 @@ b32 unify_node_and_type_(AstTyped** pnode, Type* type, b32 permanent) { AstArrayLiteral* al = (AstArrayLiteral *) node; array_type = type_make_array(context.ast_alloc, elem_type, bh_arr_length(al->values)); + *pnode = (AstTyped *) make_cast(context.ast_alloc, node, type); + break; }