diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/reflection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp index 0558ff773..59b50891c 100644 --- a/source/slang/reflection.cpp +++ b/source/slang/reflection.cpp @@ -438,12 +438,17 @@ SLANG_API SlangReflectionType * spReflection_FindTypeByName(SlangReflection * re return (SlangReflectionType*)result.Ptr(); Decl* resultDecl = nullptr; + auto nameObj = compileRequest->getNamePool()->getName(name); for (auto module : compileRequest->loadedModulesList) { - auto nameObj = compileRequest->getNamePool()->getName(name); if (module->moduleDecl->memberDictionary.TryGetValue(nameObj, resultDecl)) break; } + for (auto transUnit : compileRequest->translationUnits) + { + if (transUnit->SyntaxNode->memberDictionary.TryGetValue(nameObj, resultDecl)) + break; + } if (resultDecl) { RefPtr<DeclRefType> declRefType = new DeclRefType(); |
