mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- 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.
24 lines
279 B
Plaintext
24 lines
279 B
Plaintext
module test;
|
|
|
|
struct Struct
|
|
{
|
|
int x;
|
|
double y;
|
|
}
|
|
|
|
typedef Foo = Struct;
|
|
|
|
struct Struct2
|
|
{
|
|
Foo f;
|
|
int d;
|
|
}
|
|
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 } };
|
|
} |