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: