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

           Summary: `__traits(compiles, ...)` affect program behaviour
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-06-29 
11:50:51 MSD ---
`{ T; }` delegate makes `static assert` fail:
---
template triggerIssue()
{ enum triggerIssue = __traits(compiles, { T; }); }

template PackedGenericTuple(Args...)
{
    alias Args Tuple;
    enum e = triggerIssue!();
}

struct S { }

template T()
{
    alias T = PackedGenericTuple!S;
}

void main()
{
    alias t = T!();
    static assert(is(t.Tuple[0])); // Fails
}
---

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

Reply via email to