On Monday, 2 May 2016 at 18:57:49 UTC, Namespace wrote:
A slice of a no-longer-existing temporary! Admittedly, this is not an issue with your code, but a deeper issue of allowing slicing of rvalues.This works: ---- int[] as = [1, 2, 3].s; writeln(as[2]);
Of course this slice is only valid as long as you dont leave the scope. That's maybe what you tried to say, right?