https://issues.dlang.org/show_bug.cgi?id=1432
Iain Buclaw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |[email protected] Resolution|FIXED |--- --- Comment #9 from Iain Buclaw <[email protected]> --- This issue seems to be closed for the wrong reason. >From runnable/structlit.d: --- union U7727A3 { int i; double d = 2.5; } union U7727B3 { double d; int i = 123; } void test7727() { import core.stdc.math : isnan; // Blocked by https://issues.dlang.org/show_bug.cgi?id=1432 { U7727A3 u; assert(u.d == 2.5); } { U7727A3 u = { i: 1024 }; assert(u.i == 1024); } { U7727A3 u = { d: 1.225 }; assert(u.d == 1.225); } static assert(!__traits(compiles, { U7727A3 u = { i: 1024, d: 1.225 }; } )); // Blocked by https://issues.dlang.org/show_bug.cgi?id=1432 { U7727B3 u; assert(u.i == 123); } { U7727B3 u = { i: 1024 }; assert(u.i == 1024); } { U7727B3 u = { d: 1.225 }; assert(u.d == 1.225); } static assert(!__traits(compiles, { U7727B3 u = { i: 1024, d: 1.225 }; } )); } --
