D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2471 - .stringof for nested types does not include outer symbol
Summary: .stringof for nested types does not include outer symbol
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-24 16:57 UTC by Neia Neutuladh
Modified: 2019-05-11 16:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Neia Neutuladh 2008-11-24 16:57:59 UTC
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.