digitalmars.D - (while bit still exists) is this implicit cast intentional or a compiler
- John Stoneham (7/7) Feb 20 2006 bit notme(bit B) { return !B; }
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