Thread overview
[Issue 17371] [REG 2.074.0] di generation broken for anonymous classes
Nov 14
RazvanN
Nov 14
RazvanN
Nov 14
RazvanN
November 14
https://issues.dlang.org/show_bug.cgi?id=17371

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> ---
PR that caused it [1] .

The header generation takes into account if a class is anonymous by invoking the final method Dsymbol.isAnonymous. The specified methods verifies if a symbol is anonymous by checking if the id is null, but when a class is instantiated with a null id, it generates one [2] thus scrambling things up. I think that the easiest way to fix this is to declare a new bool field (isanon) which is set to true when a null id is passed to the instantiation of a class declaration and the header generation can check for that field instead of the wrong isAnonymous method.

PR coming soon.

[1] https://github.com/dlang/dmd/pull/5565
[2]
https://github.com/dlang/dmd/pull/5565/files#diff-ddbaa5e9ca3d5c90a425a9dfafaf1734R225

--
November 14
https://issues.dlang.org/show_bug.cgi?id=17371

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|nobody@puremagic.com        |razvan.nitu1305@gmail.com

--
November 14
https://issues.dlang.org/show_bug.cgi?id=17371

--- Comment #2 from RazvanN <razvan.nitu1305@gmail.com> ---
PR : https://github.com/dlang/dmd/pull/7315

--