[Issue 19479] Garbage .init in string mixins in static foreach in mixin templates
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Feb  6 06:41:41 UTC 2020
    
    
  
https://issues.dlang.org/show_bug.cgi?id=19479
Dlang Bot <dlang-bot at dlang.rocks> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
--- Comment #4 from Dlang Bot <dlang-bot at dlang.rocks> ---
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
--
    
    
More information about the Digitalmars-d-bugs
mailing list