https://issues.dlang.org/show_bug.cgi?id=19479
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #3 from Dlang Bot <[email protected]> --- @ibuclaw created dlang/dmd pull request #10767 "fix Issue 19479 - Garbage .init in string mixins in static foreach in mixin templates" fixing this issue: - 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 --
