Summary: [CTFE] ICE on cross-module call of function checking
                    CTFE-ability of function with invalid switch statement
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-07-15 10:40:19 PDT ---
Tested with DMD 2.053.
Took me some time to reduce this:

import B;
void main(){foo();}

int bar(){switch(0){};} // any switch statement that does not compile will do.
auto foo(){static if(__traits(compiles,{enum x=bar();})){}}

This code provokes an internal compiler error:
$ dmd A B
dmd: statement.c:2758: virtual Statement* SwitchStatement::semantic(Scope*):
Assertion `!cases' failed.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to