[Issue 21171] New: Undefined identifier when alias inside static if.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 17 20:41:27 UTC 2020


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

          Issue ID: 21171
           Summary: Undefined identifier when alias inside static if.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

Reduced test.

globals.d
---
import identifier;

static if (0)
{
}
else
{
    alias Uint64 = ulong;
    alias Int64 = long;
}

alias sinteger_t = Int64;
alias uinteger_t = Uint64;



identifier.d
---
import globals;
struct Token
{
    union
    {
        sinteger_t intvalue;
        uinteger_t unsvalue;
    }
}
---

--


More information about the Digitalmars-d-bugs mailing list