https://issues.dlang.org/show_bug.cgi?id=19479
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Dlang Bot <[email protected]> --- dlang/dmd pull request #10767 "fix Issue 19479 - Garbage .init in string mixins in static foreach in mixin templates" was merged into master: - 02ddfe07acc0c0cee4cc8f5aa30210d9ad235e92 by Iain Buclaw: fix Issue 19479 - Garbage .init in string mixins in static foreach in mixin templates The problem was that the mixin was being omitted from the codegen during the conversion from StaticForeachDeclaration to a Statement. The first issue with `toStatement` is that it is visiting all members in the StaticForeachDeclaration's `decl`, whereas the semantically compiled list of Dsymbols is instead found in `cache`. This is what caused the CompileDeclaration to be omitted. The second issue with `toStatement` is that converting an already compiled StaticForeachDeclaration into a new StaticForeachStatement results in `makeTupleForeach` being called twice for the same StaticForeach symbol. There is no need to create a new StaticForeachStatement, simply the unrolling of all members is enough. https://github.com/dlang/dmd/pull/10767 --
