digitalmars.D.bugs - [Issue 10000] New: anonymous union returning wrong value when combined with CTFE
- d-bugmail puremagic.com (24/24) Apr 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10000
- d-bugmail puremagic.com (7/7) Apr 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10000
- d-bugmail puremagic.com (10/10) Apr 27 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10000
http://d.puremagic.com/issues/show_bug.cgi?id=10000 Summary: anonymous union returning wrong value when combined with CTFE Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: moebiuspersona gmail.com I have attached an example to this bug report. For whatever reason, when using an anonymous union inside a struct and initializing a value from a constructor argument, I'm seeing the wrong value. I first noticed it when trying to force execution of my JSON library's parseJSON function at compile time using enum, and I kept getting an empty object back. This only seems to happen when mixing types in the union like numbers and strings, arrays and numbers, etc. I ran the example with rdmd 2.062. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 27 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10000 Created an attachment (id=1211) An example of the bug mentioned -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 27 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10000 Martin Nowak <code dawg.eu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |code dawg.eu Works in HEAD, but it would still be interesting to know what fixed the bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 27 2013