https://issues.dlang.org/show_bug.cgi?id=12920
--- Comment #7 from Marc Schütz <[email protected]> --- (In reply to Martin Krejcirik from comment #6) > (In reply to Marc Schütz from comment #5) > > No, the foreach iterates over `values`, which is a tuple. It should > > therefore get unrolled, and `v` should become a constant. > > It cannot become a constant if a,b,c are not constants. It could still work > if foreach is unrolled at compile-time, but that would be an enhancement > request, I think. foreach over a tuple _is_ unrolled, that's already implemented behaviour. But you're right that `values` could indeed refer to global or even local vars, didn't think of that. --
