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

           Summary: template alias parameters cannot take 'this'
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from SHOO <[email protected]> 2010-09-03 08:11:24 PDT ---
This code doesn't work:
----------------------------------------------------
template Template(alias v){ bool Template = true; }

class C
{
        void func() { assert(Template!(this)); }
}
----------------------------------------------------

Results:
prog.d(5): Error: expression this is not a valid template value argument
prog.d(5): Error: template instance prog.Template!(this) error instantiating


I wondered whether it is specified behavior.
But, I think this code should be able to compile.

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

Reply via email to