Files
c3c/test/test_suite/distinct/distinct_struct_array.c3
Christoffer Lerno 99cfaa1583 Refactor protocols.
2023-10-06 22:31:41 +02:00

20 lines
258 B
Plaintext

module test;
distinct Foo = int;
struct Struct
{
Foo x;
int y;
}
distinct Struct2 = Struct;
distinct StructArr = Struct2[3];
fn void test(int x)
{
StructArr z = { { .x = 1 }, { .y = x }, { 1, 2 }};
usz len = z.len;
Foo zz = z[2].x;
}