www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11746] New: invalid enum forward reference pattern not detected


           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 puremagic.com
        ReportedBy: timon.gehr gmx.ch

--- Comment #0 from timon.gehr 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: -------
Dec 14 2013