diff options
| author | Yong He <yonghe@outlook.com> | 2023-12-08 16:10:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-08 16:10:27 -0800 |
| commit | 12fcffaaaf2d1ffa2eefa680e2d7c9971e38a5db (patch) | |
| tree | fab26218d438d6d6057eab2d3548a72561c18fae /source/slang/slang-check-decl.cpp | |
| parent | 4321929879c1ed5b87ff95a99ca7da91e28d18fd (diff) | |
Handle import, entrypoint and global params in included files. (#3395)
* Handle `import`, entrypoint and global params in included files.
* Fix language server.
* Extend `_createScopeForLegacyLookup` for `__include`.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
| -rw-r--r-- | source/slang/slang-check-decl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index 39f0b9096..396fdd297 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -6830,7 +6830,7 @@ namespace Slang void SemanticsVisitor::importFileDeclIntoScope(Scope* scope, FileDecl* fileDecl) { // Create a new sub-scope to wire the module - // into our lookup chain. + // into our lookup chain. auto subScope = getASTBuilder()->create<Scope>(); subScope->containerDecl = fileDecl; @@ -6882,10 +6882,10 @@ namespace Slang // We need to look for a module with the specified name // (whether it has already been loaded, or needs to // be loaded), and then put its declarations into - // the current scope. + // the module's scope. auto name = decl->moduleNameAndLoc.name; - auto scope = decl->scope; + auto scope = getModuleDecl(decl)->ownedScope; // Try to load a module matching the name auto importedModule = findOrImportModule( |
