Hello Ary,
Well, it should work! const means, once a value is assigned to that variable, it never changes again. The compiler can do static analysis to verify this. And that's why it works. And that's why D should also work this way, IMHO.
In D1, const is truly const, as in never changes, ever, not even from one run of the program to another. D2 keeps this idea but IIRC calls it something else.