Bug 9460 – stringof on templated classes fails to list the template arguments of the type

Status
REOPENED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-06T00:44:25Z
Last change time
2024-12-13T18:03:58Z
Assigned to
No Owner
Creator
Jonathan M Davis
Moved to GitHub: dmd#17571 →

Comments

Comment #0 by issues.dlang — 2013-02-06T00:44:25Z
This code class C(T) {} struct S(T) {} pragma(msg, (C!int).stringof); pragma(msg, (S!int).stringof); void main() {} prints out C S!(int) Notice that for the struct, the template arguments are printed, but for some reason, for the class, all you get is the template name and not its arguments. It's listed as if it weren't a templated type, which is both inconsistent and not particularly useful.
Comment #1 by andrej.mitrovich — 2013-02-08T11:26:10Z
[internal note]: This is closely related to Issue 3796, see Walter's comment here: http://d.puremagic.com/issues/show_bug.cgi?id=3796#c2
Comment #2 by k.hara.pg — 2015-01-06T08:34:39Z
Fixed in 2.065. *** This issue has been marked as a duplicate of issue 1748 ***
Comment #3 by b2.temp — 2019-07-23T01:09:07Z
*** Issue 9815 has been marked as a duplicate of this issue. ***
Comment #4 by robert.schadek — 2024-12-13T18:03:58Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17571 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB