www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2471] New: .stringof for nested types does not include outer symbol

http://d.puremagic.com/issues/show_bug.cgi?id=2471

           Summary: .stringof for nested types does not include outer symbol
           Product: D
           Version: 1.036
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dhasenan gmail.com




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.


-- 
Nov 24 2008