[Issue 3820] New: Small hole in switch semantics

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 18 11:04:45 PST 2010


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

           Summary: Small hole in switch semantics
           Product: D
           Version: 2.040
          Platform: All
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-02-18 11:04:44 PST ---
void main() {
    switch (1) {
        int x;
        case 1:
            assert(x == int.init);
        default:
    }
}

Here often x != x.init.
D isn't C, so it's better to avoid holes in its semantics, if possible.

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