diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 00ffbab975..eea5af8de4 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -1487,6 +1487,21 @@ class SymbolTableVisitor : public CommonVisitor { } } + void visit_ClassDef(const AST::ClassDef_t &x) { + SymbolTable *parent_scope = current_scope; + current_scope = al.make_new(parent_scope); + for (size_t i=0; i(tmp), nullptr, 0); + ASR::symbol_t * t = ASR::down_cast(tmp); + parent_scope->scope[x.m_name] = t; + current_scope = parent_scope; + } + void create_GenericProcedure(const Location &loc) { for(auto &p: overload_defs) { std::string def_name = p.first;