struct A
{
int a,b;
}
void f()
{
int[4] rgi=[1,2,3,4]; //(1) ok? why?
A x={1,2}; //(2) ok
A y={a:1,b:2}; //(3) fail. why?
x=A(1,2); //(4) ok
x=A(a:1,b:2); //(5) fail
x={1,2}; //(6) fail
x={a:1,b:2}; //(7) fail
}
Why third line doesn't work? And making 5th or 7th line work will be also nice.
Comment #1 by dlang-bugzilla — 2017-07-02T01:30:07Z
Line (3) was fixed in 2.053.
The last 3 are non-trivial language changes and would need to be done as DIPs. At least some of them look somewhat syntactically ambiguous, too (with delegate literals).