www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12291] New: Pick up "this" from alias parameters to nested templates


           Summary: Pick up "this" from alias parameters to nested
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com

--- Comment #0 from Vladimir Panteleev <thecybershadow gmail.com> 2014-03-03
14:31:40 EET ---
////// test.d /////
void fun(alias a)()
    a = 42;

struct S
    int x;

void main()
    S s;

Currently, this fails with:
test.d(14): Error: need 'this' for 'fun' of type 'pure nothrow  safe void()'

However, we provide the "this" in the "s.x" expression.

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