digitalmars.D.bugs - [Issue 4799] New: template alias parameters cannot take 'this'
- d-bugmail puremagic.com (29/29) Sep 03 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4799
- d-bugmail puremagic.com (13/13) May 07 2011 http://d.puremagic.com/issues/show_bug.cgi?id=4799
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: nobody puremagic.com ReportedBy: zan77137 nifty.com 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: -------
Sep 03 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4799 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|NEW |RESOLVED CC| |k.hara.pg gmail.com Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 693 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 07 2011