On Friday, 15 March 2013 at 02:31:32 UTC, anonymous wrote:
Then it struck me:
The compiler doesn't know that f's return value is unknown to the rest of the world, because f isn't marked pure. And, indeed, make f pure and it just works: int[] f() pure {return [1, 2, 3];} immutable v = f();

Awesome!

And it would be even more awesomer if std.array.array was pure ... bummer

Reply via email to