test278

Undocumented in source.
immutable
auto test278 = q{--- test278.vx // nnamed arguments for structs, errors struct Color { u8 r = 1; u8 g = 2; u8 b = 3; u8 a; } struct ColorStatic { @static u8 r = 1; u8 g = 2; u8 b = 3; u8 a; } union U { u8 b; f32 f; } Color make_1() { return Color(r: 1, g: 2, b: 3, w: 4); } ColorStatic make_2() { return ColorStatic(r: 1); } Color make_3() { return Color(1, 2, 3, 4, 5); } Color make_4() { return Color(r: 1, 2, 3, 4, 5); } U make_5() { return U(b: 1, f: 1.0); } --- <error> test278.vx:5:50: Error: struct `Color` has no member named `w` test278.vx:6:44: Error: cannot initialize variable `r` of struct `ColorStatic` test278.vx:7:31: Error: cannot initialize struct `Color` with 5 arguments, it has 4 members test278.vx:8:31: Error: cannot initialize struct `Color` with 5 arguments, it has 4 members test278.vx:8:38: Error: named and positional arguments cannot be mixed in struct constructor test278.vx:9:23: Error: union constructor must have a single argument, not 2 };

Meta