[Issue 3031] scoped static var conflicts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 7 23:02:46 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=3031

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #12 from Dlang Bot <dlang-bot at dlang.rocks> ---
@NilsLankila created dlang/dmd pull request #11250 "fix issue 3031 - static var
and func declaration conflict in different sub scope" fixing this issue:

- fix issue 3031 - static var and func declaration conflict in different sub
scope

  The approach of the fix is based on the observation that the fundamental (and
only) problem was that allowing such declarations would produce same mangling.
  Now when the insertion in the scope fails, and if the declaration was static,
its name is changed and a **local** alias declaration, taking the previous
name, is generated.

  This works because:
  - the static declaration, the one that needs a unique mangle, has now an
unique identifier.
  - the code following the declaration use the new alias.

https://github.com/dlang/dmd/pull/11250

--


More information about the Digitalmars-d-bugs mailing list