digitalmars.D.bugs - [Issue 11662] New: Template constraint evaluation should not look eponymous template function parameters if it's unnecessary
- d-bugmail puremagic.com (36/36) Dec 01 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11662
- d-bugmail puremagic.com (12/12) Dec 01 2013 https://d.puremagic.com/issues/show_bug.cgi?id=11662
https://d.puremagic.com/issues/show_bug.cgi?id=11662 Summary: Template constraint evaluation should not look eponymous template function parameters if it's unnecessary Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: k.hara.pg gmail.com Both template functions should work, but doesn't. template gc_free1(T) { alias Type = T*; void gc_free1(Type data) {} } template gc_free2(T) if (!is(T == class)) { alias Type = T*; void gc_free2(Type data) {} } void main() { int* p; gc_free1!int(p); // OK gc_free2!int(p); // Error: undefined identifier Type } -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 01 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11662 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull Severity|normal |major With git head, the OP code causes compiler segfault. https://github.com/D-Programming-Language/dmd/pull/2910 -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 01 2013