qznc:
Operator precedence of "." is higher than unary minus.
You are right, I didn't know it, so Typedef and constructors are not to blame:
double foo(in double x) { assert (x >= 0); return x; } void main() { assert(-1.foo == -1); }Is this a good design of the operator precedences? Is this worth changing/fixing?
Bye, bearophile