From 64478171f7411bb47ad9443927be439ca95411b8 Mon Sep 17 00:00:00 2001 From: mgtm98 Date: Mon, 5 Aug 2024 02:35:51 +0300 Subject: [PATCH] Run symbol table link check only on Jac modules --- jaclang/compiler/passes/main/access_modifier_pass.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jaclang/compiler/passes/main/access_modifier_pass.py b/jaclang/compiler/passes/main/access_modifier_pass.py index ce826ad11..91811b7c9 100644 --- a/jaclang/compiler/passes/main/access_modifier_pass.py +++ b/jaclang/compiler/passes/main/access_modifier_pass.py @@ -23,7 +23,12 @@ def after_pass(self) -> None: def exit_node(self, node: ast.AstNode) -> None: """Exit node.""" super().exit_node(node) - if settings.lsp_debug and isinstance(node, ast.NameAtom) and not node.sym: + if ( + settings.lsp_debug + and isinstance(node, ast.NameAtom) + and not node.sym + and not node.parent_of_type(ast.Module).py_raised + ): self.warning(f"Name {node.sym_name} not present in symbol table") def access_check(self, node: ast.Name) -> None: