Files
c3c/test/test_suite/distinct/distinct_struct_array.c3
Christoffer Lerno df77b692d6 Support "typedef"
2023-02-14 16:49:27 +01:00

20 lines
282 B
C

module test;
typedef Foo = distinct int;
struct Struct
{
Foo x;
int y;
}
typedef Struct2 = distinct Struct;
typedef 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;
}