summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ast-decl-ref.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-07-01 14:02:35 -0700
committerGitHub <noreply@github.com>2025-07-01 21:02:35 +0000
commiteb7f3357a1c316bad51cf0bfaea27d81a93f96ad (patch)
tree448a2a07d36ef11b66ef79522086765efc5e708b /source/slang/slang-ast-decl-ref.cpp
parent5120c1cd072548654c9ce79fa85426a5e48736c4 (diff)
Misc language server improvements. (#7569)
* Misc language server improvements. * Fix. * Fix decl path printing for existential lookup. * More existential decl path fix. * Polish. * Fix test.
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;