Skip to content

Commit 448b646

Browse files
committed
fix failing tests
1 parent b809028 commit 448b646

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,7 +2188,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
21882188
}
21892189

21902190
ASR::symbol_t *s = current_scope->resolve_symbol(call_name), *s_generic = nullptr;
2191-
if (s->type == ASR::symbolType::GenericProcedure){
2191+
if (s!=nullptr && s->type == ASR::symbolType::GenericProcedure) {
21922192
ASR::GenericProcedure_t *p = ASR::down_cast<ASR::GenericProcedure_t>(s);
21932193
int idx = select_generic_procedure(args, *p, x.base.base.loc);
21942194
// Create ExternalSymbol for procedures in different modules.
@@ -2331,10 +2331,10 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
23312331
value = intrinsic_procedures.comptime_eval(call_name, al, x.base.base.loc, args);
23322332
}
23332333
tmp = ASR::make_FunctionCall_t(al, x.base.base.loc, stemp,
2334-
nullptr, args.p, args.size(), nullptr, 0, a_type, value, nullptr);
2334+
s_generic, args.p, args.size(), nullptr, 0, a_type, value, nullptr);
23352335
} else if(ASR::is_a<ASR::Subroutine_t>(*s)) {
23362336
tmp = ASR::make_SubroutineCall_t(al, x.base.base.loc, stemp,
2337-
nullptr, args.p, args.size(), nullptr);
2337+
s_generic, args.p, args.size(), nullptr);
23382338
} else {
23392339
throw SemanticError("Unsupported call type for " + call_name,
23402340
x.base.base.loc);

0 commit comments

Comments
 (0)