From 6bbac2edf7c50dac4d755a364b6dfd16471284d7 Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 09:56:19 +0330 Subject: analyzer: check borrow returns of forward-called functions at the unit's end; borrows clause for prototypes, definitions, externs and function types, checked against the body --- tests/test.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/test.sh') diff --git a/tests/test.sh b/tests/test.sh index 7745a66..d8ad0fb 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -216,6 +216,8 @@ ABC" "$l o3 lifts byte loads and stores" chk "$($vm < tests/programs/o3.zc)" "3142 42 43 9 57 98781 520625 10192 -18782 1152" "$l o3 regions: loops, calls, recursion, switch, arrays, more vars than registers" chk "$($vm < tests/programs/o3scopes.zc)" "116" "$l o3 registers shared by scopes, cached fixed arrays" chk "$($vm < tests/programs/borrow_rules.zc)" "$(cat tests/programs/borrow_rules.expected)" "$l inferred transfers, projections and shared closure cells" + chk "$($vm < tests/programs/forward_borrow.zc)" "2b00" "$l forward calls: results that do not borrow, or are not used after the owner ends, are accepted" + chk "$($vm < tests/programs/borrows_clause.zc)" "x" "$l a borrows clause ties the result to the named argument only" chk "$($vm < tests/programs/replace_owner.zc)" "$(cat tests/programs/replace_owner.expected)" "$l replacing a released owner moves ownership and cleans up once" chk "$($vm < tests/programs/temporary_borrows.zc)" "$(cat tests/programs/temporary_borrows.expected)" "$l temporary borrows preserve aliases and release allocations" chk "$($vm < tests/programs/array_values.zc)" "$(cat tests/programs/array_values.expected)" "$l array initializers, designators, zero filling, nested and compound literals" -- cgit v1.2.3