https://issues.dlang.org/show_bug.cgi?id=20581
kinke <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from kinke <[email protected]> --- This seems to be a 2.091 regression. Using an explicit non-temporary still works, with an equivalent lifetime of the temporary: void main() @safe { int[5] a = [ 1, 2, 3, 4, 5 ]; { auto blub = retro(a[]).source; assert(blub is a[]); } } The original expression with temporary is lowered to: assert(((int[] __assertOp4 = retro(a[]).source;) , __assertOp4) is a[], _d_assert_fail(__assertOp4, a[])); // Generates the message for -checkaction=context and takes both // operands by `auto ref const`. string _d_assert_fail(ref const(int[]) a, const(int[]) b) { ... } _d_assert_msg might throw later, using the generated msg, as Florian mentioned. --
