We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8f63b0 commit 0d85df3Copy full SHA for 0d85df3
src/lpython/semantics/python_ast_to_asr.cpp
@@ -4761,6 +4761,12 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
4761
void visit_FunctionDef(const AST::FunctionDef_t &x) {
4762
SymbolTable *old_scope = current_scope;
4763
ASR::symbol_t *t = current_scope->get_symbol(x.m_name);
4764
+
4765
+ if (t == nullptr) {
4766
+ // Throw Not implemented error.
4767
+ throw SemanticError("Internal FunctionDef: Not implemented", x.base.base.loc);
4768
+ }
4769
4770
if (ASR::is_a<ASR::Function_t>(*t)) {
4771
ASR::Function_t *f = ASR::down_cast<ASR::Function_t>(t);
4772
if (!ASRUtils::get_FunctionType(f)->m_is_restriction) {
0 commit comments