Created attachment 777
catch functions returning CANT_INTEPRET_EXP
testcase:
class A
{
bool delegate() dg;
void B()
{
static if ( dg() )
should error graciously;
}
}
Produces:
ice.d(6): Error: value of 'this' is not known at compile time
Segmentation fault (core dumped)
Catching it in gdb, occurs in interpret.c at CallExp::interpret, around line
2720. A few assignments, no checking whether or not any returned
EXP_CANT_INTERPRET.
Currently rebuilding using the attached change...
Comment #1 by ibuclaw — 2010-09-27T10:38:40Z
Tested, I now get:
ice.d(6): Error: value of 'this' is not known at compile time
ice.d(6): Error: expression this.dg() is not constant or does not evaluate to a bool
Which is correct, and fixes the ICE.
Regards