Currently specs says:
11.3.1.2. Increment and Decrement: [...] the result of prefix ++ and -- is the lvalue after the side effect has been effected.
11.3.1.4. Increment and Decrement: [...] the result of postfix ++ and -- is an rvalue just before the side effect has been effected.
The problem is that, mentioned equivalent expression works for arrays but not for associative arrays:
expr++; (ref x){auto t = x; ++x; return t;}(expr)
Can we clarify it to match the Construction or Assignment on Setting AA Entries point, because:
(ref x){auto t = x; ++x; return t;}(aa["hello"])
will fail on lookup. It's more like:
expr++; (ref x){auto t = x; ++x; return t;}(aa.require("hello", int.init))