summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-decl-ref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ast-decl-ref.cpp')
-rw-r--r--source/slang/slang-ast-decl-ref.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/slang/slang-ast-decl-ref.cpp b/source/slang/slang-ast-decl-ref.cpp
index 76d0324c6..7eec32a3a 100644
--- a/source/slang/slang-ast-decl-ref.cpp
+++ b/source/slang/slang-ast-decl-ref.cpp
@@ -131,9 +131,12 @@ DeclRefBase* LookupDeclRef::_substituteImplOverride(
void LookupDeclRef::_toTextOverride(StringBuilder& out)
{
- getLookupSource()->toText(out);
- if (out.getLength() && !out.endsWith("."))
- out << ".";
+ if (!as<ThisType>(getLookupSource()))
+ {
+ getLookupSource()->toText(out);
+ if (out.getLength() && !out.endsWith("."))
+ out << ".";
+ }
if (getDecl()->getName() && getDecl()->getName()->text.getLength() != 0)
{
out << getDecl()->getName()->text;