digitalmars.D.bugs - [Issue 7064] New: .stringof of eponymous template
- d-bugmail puremagic.com (30/30) Dec 04 2011 http://d.puremagic.com/issues/show_bug.cgi?id=7064
- d-bugmail puremagic.com (17/17) Dec 04 2011 http://d.puremagic.com/issues/show_bug.cgi?id=7064
http://d.puremagic.com/issues/show_bug.cgi?id=7064 Summary: .stringof of eponymous template Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch struct S(T){int x;} template X(T){ struct S{int x;} } void main(){ pragma(msg, S!int); // "struct S" pragma(msg, X!int); // X!(int) pragma(msg, X!int.S); // "S", why not identical to first one? } The fact that for eponymous templates the template parameters are not shown sometimes has a severe negative impact on the readability of error messages, as well as on the usefulness of debug output via pragma(msg) I propose that .stringof for eponymous templates should apply to the template instance instead of to the eponymous declaration. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 04 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7064 timon.gehr gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|.stringof of eponymous |.stringof of eponymous |template |struct/class/interface | |template But that should only be the case for templated types, for example the following should still print "1": template X(int x) { enum X = x; } pragma(msg, X!1); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 04 2011