Files
c3c/test/test_suite/distinct/distinct_struct.c3
Christoffer Lerno 5c77c9a754 - Change distinct -> typedef.
- Order of attribute declaration is changed for `alias`.
- Added `LANGUAGE_DEV_VERSION` env constant.
- Rename `anyfault` -> `fault`.
- Changed `fault` -> `faultdef`.
- Added `attrdef` instead of `alias` for attribute aliases.
2025-03-15 20:10:47 +01:00

28 lines
345 B
Plaintext

struct Struct
{
int x;
double y;
}
typedef Foo = Struct;
struct Struct2
{
Foo f;
int d;
struct bar
{
Foo x;
}
}
Foo f = { 1, 1.0 };
fn void test(int x)
{
Struct s = { 1, 2.0 };
Foo f2 = (Foo)(s);
Foo f3 = { .x = 1 };
Struct2 s2 = { .f = { 1, 2.0 } };
Struct2 s3 = { .bar.x.y = 3.0 };
}