That should be:if( rth == Intention.EVIL ) and foo( Intention.EVIL );
Phobos is less picky than the compiler. Try this:
import std.stdio;
enum Intention
{
EVIL,
NEUTRAL,
GOOD,
SAINTLY
}
void foo(Intention rth)
{
if (rth == Intention.EVIL)
writefln("The road to hell is paved with %s and %d", rth,
rth);
}
void main()
{
foo(Intention.EVIL);
}
