[Issue 9129] New: Definite return analysis fails for nested case statements

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 9 12:46:02 PST 2012


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

           Summary: Definite return analysis fails for nested case
                    statements
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          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 2012-12-09 12:46:01 PST ---
DMD 2.060:

enum E{ v }
template Seq(T...){ alias T Seq; }
int foo(){
    E e;
    final switch(e){
        if(e) case E.v: return 0;
    }
    final switch(e)
    foreach(x;Seq!(E.v))
    case x: return 0;
}

Error: function foo no return exp; or assert(0); at end of function

The code should compile.

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