summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/slang/slang-ast-decl-ref.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/slang/slang-ast-decl-ref.cpp b/source/slang/slang-ast-decl-ref.cpp
index 29ab7f86e..3025381ea 100644
--- a/source/slang/slang-ast-decl-ref.cpp
+++ b/source/slang/slang-ast-decl-ref.cpp
@@ -336,8 +336,10 @@ void DeclRefBase::toText(StringBuilder& out)
List<Decl*> decls;
for (auto dd = getDecl(); dd; dd = dd->parentDecl)
{
- // Skip the top-level decl.
- if (as<ModuleDecl>(dd))
+ // Skip the module, file & include decls since their names are
+ // considered "transparent"
+ //
+ if (as<ModuleDecl>(dd) || as<FileDecl>(dd) || as<IncludeDecl>(dd))
continue;
// Skip base decls in generic containers. We will handle them when we handle the generic