Comment #0 by verylonglogin.reg — 2014-06-13T09:20:51Z
Because of Issue 12909 `rehash` is incorrectly inferred as strongly pure for an associative array with key of non-mutable array or pointer. As a result it can be discarded by an optimizer and also breaks compilation of this code with `-w` ("warnings as errors" ) switch:
---
const(int[])[int] aa;
auto f(){ return aa; } // to make r-value
void main()
{
f().rehash();
}
---
main.d(6): Warning: calling object.rehash!(const(int[])[int], const(int[]), int).rehash without side effects discards return value of type const(int[])[int], prepend a cast(void) if intentional
---