mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
20 lines
281 B
C
20 lines
281 B
C
module test;
|
|
|
|
define Foo = distinct int;
|
|
|
|
struct Struct
|
|
{
|
|
Foo x;
|
|
int y;
|
|
}
|
|
|
|
define Struct2 = distinct Struct;
|
|
define StructArr = distinct Struct2[3];
|
|
|
|
fn void test(int x)
|
|
{
|
|
StructArr z = { { .x = 1 }, { .y = x }, { 1, 2 }};
|
|
usize len = z.len;
|
|
Foo zz = z[2].x;
|
|
}
|