I've boiled it down to this:

bool flag() {
        bool left, right;
        return true ? cast(const bool)left : cast(bool)right;
}

Error: cannot implicitly convert expression (cast(int)left) of type int to bool

It seems like whenever the left and right sides differ in const-ness or 
invariant-ness, dmd tries to convert the left side to an int. Can anyone 
confirm or explain?

Reply via email to