struct S
{
int a : 3;
int b : 3;
}
void test()
{
S s = S(1, 2); // Error: overlapping initialization for `b`
S s = S(a:1, b:2); // Error: overlapping initialization for `b
}
This behaviour is not seen when compiling C code via importc.
struct S
{
int a : 3;
int b : 3;
};
int main()
{
struct S s = {1, 2}; // OK
struct S t = {.a=1, .b=2}; // OK
__check(s.a == 1);
__check(s.b == 2);
}