D-Scanner
D-Scanner copied to clipboard
Warnings with the shift operator
The code:
void main()
{
const Foo foo;
bool bl;
foo >> bl;
}
struct Foo
{
bool bar = true;
void opBinary(string op)(out bool value) if (op == ">>")
{
value = bar;
}
}
Give the following warnings:
Variable foo is never used. Variable bl is never modified and could have been declared const or immutable. Variable bl is never used.