Structure initialiser doesn't support designated initialisers
Submitted by David given
Link to original bug (#649009)
Description
This works:
struct Foo { int a; int b; int c; } Foo foo = new Foo() { c=1, b=2, a=3 } (this creates a new inline instance and initialised foo by assignment)
...but this doesn't:
Foo foo = { c=1, b=2, a=3 } (this initialises foo in-place)
Also, this is accepted but produces bad code:
Foo foo = { c:1, b:2, a:3 } (the tags are ignored and the fields are initialised in order)
I'm not sure what's going on there, but as this syntax is used by other languages and it looks like it works, it probably shouldn't.
Version: 0.12.x