http://d.puremagic.com/issues/show_bug.cgi?id=7363

           Summary: Eponymous Template doesn't hide internal names in some
                    cases with `static if`
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis <verylonglogin....@gmail.com> 2012-01-25 00:43:06 MSK 
---
It still works sometimes so I decided not to reopen Issue 4675 but create a new
one. Testcases:
---
template t() {
    enum e = 0;
    static if (true)
        enum t = 0;
}

static assert(!__traits(compiles, t!().t == 0)); // Assertion fails
static assert(t!() == 0); // Error: void has no value
---
and
---
template t()
{
    static if (true) {
        enum e = 0;
        enum t1 = 0;
    }
    alias t1 t;
}

static assert(!__traits(compiles, t!().t == 0)); // Assertion fails
static assert(t!() == 0); // Error: void has no value
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to