Bug 2471 – .stringof for nested types does not include outer symbol
Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2008-11-24T16:57:59Z
Last change time
2019-05-11T16:30:47Z
Assigned to
No Owner
Creator
Neia Neutuladh
Comments
Comment #0 by dhasenan — 2008-11-24T16:57:59Z
This is related to #1748, but is a bit beyond the scope of that bug.
template R(T) { struct S; }
// (R!(int).S).stringof == "S";
class R { struct S; }
// (R.S).stringof == "S";
When doing code generation using CTFE and mixins, it'd be useful to get the outer symbol included in .stringof. For debugging, this would also be helpful.
Due to static imports, ideally .stringof would give the fully qualified name. The workaround is to use .mangleof and demangle.