From 12fcffaaaf2d1ffa2eefa680e2d7c9971e38a5db Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 8 Dec 2023 16:10:27 -0800 Subject: 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 --- source/slang/slang-lower-to-ir.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/slang/slang-lower-to-ir.cpp') diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index 8f94b7e90..f0fd33e13 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -7304,6 +7304,11 @@ struct DeclLoweringVisitor : DeclVisitor // Variable declared at global/namespace scope? -> Global. return true; } + else if (as(parent)) + { + // Variable declared at file scope? -> Global. + return true; + } else if(as(parent)) { if(decl->hasModifier()) -- cgit v1.2.3