https://issues.dlang.org/show_bug.cgi?id=21209
ag0aep6g <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] See Also| |https://issues.dlang.org/sh | |ow_bug.cgi?id=20674, | |https://issues.dlang.org/sh | |ow_bug.cgi?id=20150 --- Comment #2 from ag0aep6g <[email protected]> --- (In reply to Mathias LANG from comment #1) > The strangest part is that not calling `bar` from the > foreach makes the error go away. That's because `bar` is not `pure`. Without the `bar` call, `foo` becomes `pure` and you're hitting issue 20150 (DMD wrongly assumes that parameters of `pure` functions can always be `scope`). When not relying on issue 20150, inference of `scope` is very limited. See also issue 20674. --
