cli: preserve whole-array arguments for explicit array parameters

This commit is contained in:
dev committed 2026-10-07 22:29:45 +03:00
1 parent f733f7c7bb
commit dde801c653
44 files changed
+397 -9

No files matched your search

@@ -0,0 +1,8 @@
// expect: reject E2101 E2101
// The conflicting reborrow and its use at the call each reject.
// phase: 6
// spec: docs/spec/15-source-language.md §5
module test.array_arguments
fn set(a: mut<[u64; 2]>) -> void effects [] { a[0] = 42; }
fn forward(a: mut<[u64; 2]>) -> u64 effects [] { ref item = a[0]; set(mut a); return *item; }
fn main() -> u64 effects [] { var a: [u64; 2] = zero; return forward(mut a); }