[Issue 10091] New: [HEAD] Cannot cast struct member string enum to static ubyte array of same size

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 15 23:38:05 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10091

           Summary: [HEAD] Cannot cast struct member string enum to static
                    ubyte array of same size
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-05-16 10:38:04 MSD ---
---
struct S
{ enum e = "a"; }

void main()
{
    auto arr = cast(ubyte[1]) S.e; // Error: e2ir: cannot cast "a" of type
string to type ubyte[1u]
}
---

-- 
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