Thread overview
[Issue 19158] declaration is already defined in another scope in main at line
Aug 11, 2018
Ali Ak
Jul 16, 2021
KytoDragon
Jul 19, 2021
Mathias LANG
August 11, 2018
https://issues.dlang.org/show_bug.cgi?id=19158

--- Comment #1 from Ali Ak <ali.akhtarzada@gmail.com> ---
*should be no different than...

--
July 16, 2021
https://issues.dlang.org/show_bug.cgi?id=19158

KytoDragon <kytodragon@e.mail.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kytodragon@e.mail.de
           Hardware|x86                         |All
                 OS|Mac OS X                    |All

--- Comment #2 from KytoDragon <kytodragon@e.mail.de> ---
I would like to add, that this also blocks the usage of multiple static variables with the same name inside one function, not just type definitions.

void main() {
    {
        __gshared int x = 0;
    }
    {
        __gshared float x = 1;
    }
}

This is used by libraries like Dear ImGui.

--
July 18, 2021
https://issues.dlang.org/show_bug.cgi?id=19158

moonlightsentinel@disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |moonlightsentinel@disroot.o
                   |                            |rg
         Resolution|---                         |FIXED

--- Comment #3 from moonlightsentinel@disroot.org ---
Fixed in 2.096.1

--
July 19, 2021
https://issues.dlang.org/show_bug.cgi?id=19158

Mathias LANG <pro.mathias.lang@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pro.mathias.lang@gmail.com

--- Comment #4 from Mathias LANG <pro.mathias.lang@gmail.com> ---
For reference, this was a duplicate of issue 14831.

--