[Issue 7058] New: static initializer for structs doesn't respect init values of members
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 2 18:51:38 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7058
Summary: static initializer for structs doesn't respect init
values of members
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mrmocool at gmx.de
--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-12-02 18:50:33 PST ---
void main()
{
import std.stdio;
vec3 v = {1.5f, 2}; // with vec3(1.5f, 2) z becomes 0
writeln(v);
}
struct vec3
{
// union
// {
// struct
// {
float x = 0;
float y = 0;
float z = 0;
// }
// float[3] cell;
// }
}
$ dmd -run vector.d
vec3(1.5, 2, nan)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list