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.