[Issue 10000] New: anonymous union returning wrong value when combined with CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 27 13:29:42 PDT 2013


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 at puremagic.com
        ReportedBy: moebiuspersona at gmail.com


--- Comment #0 from w0rp <moebiuspersona at gmail.com> 2013-04-27 13:29:41 PDT ---
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: -------


More information about the Digitalmars-d-bugs mailing list