Bug 9915 – Typeid .name inconsistent between templated classes and structs

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-09T20:13:00Z
Last change time
2015-03-06T05:35:20Z
Assigned to
nobody
Creator
callumenator

Comments

Comment #0 by callumenator — 2013-04-09T20:13:09Z
DMD 2.062: struct S(T){} struct SS(T){} struct SSS(T){} class C(T){} class CC(T){} class CCC(T){} void main() { import std.stdio; writeln(typeid(S!(SS!(SSS!(int)))).name); // S!(SS!(SSS!(int))).S writeln(typeid(C!(CC!(CCC!(int)))).name); // C!(CC).C } It would be good to have the typeid().name field contain the full type name in the case of templated classes, as it already does for templated structs.
Comment #1 by callumenator — 2015-03-06T05:35:20Z
Output with dmd 2.065.0: S!(SS!(SSS!int)).S C!(CC!(CCC!int)).C seems to have been fixed.