dmd
dmd copied to clipboard
[Enhancement] Unary operator assignment
Introduce opUnaryAssign with parameter to hook assignment syntax. In particular, that’s useful for opUnaryAssign(string op : "*")(T rhs) so that the dereference operator need not return by reference to be assignable,
Essentially, if *lhs = rhs cannot be lowered to lhs.opUnary!"*"() = rhs, lower it to lhs.opUnaryAssign!"*"(rhs).