test277

Undocumented in source.
immutable
auto test277 = q{--- test277.vx // named arguments for structs (named cannot be mixed with positional) struct Color { u8 r = 1; u8 g = 2; u8 b = 3; u8 a; } Color make_0() { return Color(r: 1, g: 2, b: 3, a: 4); } Color make_1() { return Color(r: 1); } Color make_2() { return Color(r: 1, a: 4); } Color make_3() { return Color(a: 4, b: 3, g: 2, r: 1); } //union Union { u32 u; bool b; f32 f; } //Union make_4() { return Union(u: 100); } //Union make_5() { return Union(b: true); } //Union make_6() { return Union(f: 10); } };

Meta