www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12288] New: delegate literals should be allowed as class members

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: timon.gehr gmx.ch


--- Comment #0 from timon.gehr 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: -------
Mar 02 2014
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12288



--- Comment #1 from timon.gehr gmx.ch 2014-03-02 13:16:43 PST ---
*** Issue 7653 has been marked as a duplicate of this issue. ***

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