[Issue 24531] foreach lowering fails to compile with dip1000 and std.array.array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 10 10:56:45 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24531
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nick at geany.org
--- Comment #3 from Nick Treleaven <nick at geany.org> ---
It compiles with:
import std.algorithm : filter, map;
Adding -dip1000 gives:
arrayctfe.d(14): Error: scope variable `srcs` assigned to non-scope parameter
`range` calling `arrayCtfe`
arrayctfe.d(28): which is not `scope` because of `__r115 = range`
Replacing the foreach statement with the while code in comment #0 does compile
with -dip1000.
--
More information about the Digitalmars-d-bugs
mailing list