Sample, tested on 2.061alpha:
enum Command{
Char,
Any,
};
bool test(Command cmd)
{
//if with(Command) removed and Any --> Command.Any it works
switch(cmd) with(Command)
{
case Any:
return true;
default:
return false;
}
}
enum x = test(Command.Any);
Assertion failure: '!istate->start' on line 1122 in file 'interpret.c'
If I swap switch(cmd) with(Command) to with(Command) switch(cmd) it gives:
ctfe_ice.d(8): Error: Cannot interpret Command at compile time
ctfe_ice.d(17): called from here: test(cast(Command)1)