Skip to content

Commit 14236f5

Browse files
Allow assert in global scope
1 parent 20198a8 commit 14236f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3800,6 +3800,10 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
38003800
void visit_For(const AST::For_t &/*x*/) {
38013801
// We skip this in the SymbolTable visitor, but visit it in the BodyVisitor
38023802
}
3803+
3804+
void visit_Assert(const AST::Assert_t &/*x*/) {
3805+
// We skip this in the SymbolTable visitor, but visit it in the BodyVisitor
3806+
}
38033807
};
38043808

38053809
Result<ASR::asr_t*> symbol_table_visitor(Allocator &al, LocationManager &lm, const AST::Module_t &ast,

0 commit comments

Comments
 (0)