[Issue 11746] New: invalid enum forward reference pattern not detected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Dec 14 14:25:41 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11746

           Summary: invalid enum forward reference pattern not detected
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2013-12-14 14:25:39 PST ---
DMD 2.064.2 accepts the following invalid code:

string bb(int x, string y){ return "3"; }
enum E { foo = bb(cast(int)bar, cast(string)baz), bar=1, baz="2" }


(Note that E.bar is assigned type 'int'.)

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


More information about the Digitalmars-d-bugs mailing list