Files
c3c/test/test_suite/distinct/distinct_struct_array.c3
Christoffer Lerno 3e54d13b62 Prefer def
2023-06-02 20:08:45 +02:00

20 lines
270 B
C

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