www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - (while bit still exists) is this implicit cast intentional or a compiler

bit notme(bit B) { return !B; }

Using the -w switch, the compiler says that the expression (!B) is of 
type int and is implicitly converted to bit.

Using "~B" instead won't raise the warning, since "~" is a bitwise 
operator as opposed to the logical "!" operator. But if bit is being 
supported as a boolean type with logical true/false values, "!B" 
shouldn't cause a conversion to int, should it?
Feb 20 2006