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

           Summary: Alias this does not work with switch
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: rob...@octarineparrot.com


--- Comment #0 from Robert Clipsham <rob...@octarineparrot.com> 2012-04-24 
17:54:09 BST ---
struct A {
    int a;
    alias a this;
}
void main() {
    A t;
    switch(t) {
        default:
    }
}

With dmd 2.059 this results in:
test.d(7): Error: 't' is not of integral type, it is a A

I believe the alias this should allow this to work.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to