mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Regression: "'out' parameters may not be read" when writing to array #2852
This commit is contained in:
13
test/test_suite/contracts/out_array_in_struct.c3t
Normal file
13
test/test_suite/contracts/out_array_in_struct.c3t
Normal file
@@ -0,0 +1,13 @@
|
||||
struct Foo
|
||||
{
|
||||
int[2] a;
|
||||
}
|
||||
|
||||
<*
|
||||
@param [&out] bar
|
||||
*>
|
||||
fn void foo(Foo* bar)
|
||||
{
|
||||
bar.a[0] = 0;
|
||||
}
|
||||
fn int main() => 0;
|
||||
Reference in New Issue
Block a user