[Issue 12288] New: delegate literals should be allowed as class members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 2 13:15:23 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12288

           Summary: delegate literals should be allowed as class members
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2014-03-02 13:15:22 PST ---
Eg, the following code should compile:

template ID(alias a){ alias ID=a; }
class C{
    int x=3;
    alias a = ID!(()=>x);
}
static assert(new C().a()==3);

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


More information about the Digitalmars-d-bugs mailing list