https://issues.dlang.org/show_bug.cgi?id=24754

--- Comment #14 from Dennis <[email protected]> ---
(In reply to Nick Treleaven from comment #12)
> The compiler doesn't know (without optimization or -dip1000) that the
> program is equivalent to that. 

It could, all it needs to know is that typeof(Foo.foo) == typeof(new int[1]) ==
int[].

> It doesn't know below that `f` doesn't escape
> the scope of foobar somehow.

Doesn't mattter, `f` may escape, unless it's a `scope int[]`, which doesn't
really exist without `-preview=dip1000`.

--

Reply via email to