File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,14 @@ void SymbolTable::mark_all_variables_external(Allocator &al) {
39
39
case (ASR::symbolType::Function) : {
40
40
ASR::Function_t *v = ASR::down_cast<ASR::Function_t>(a.second );
41
41
ASR::FunctionType_t* v_func_type = ASR::down_cast<ASR::FunctionType_t>(v->m_function_signature );
42
+ if ((v_func_type->m_abi != ASR::abiType::Intrinsic) &&
43
+ (v_func_type->m_abi != ASR::abiType::Interactive)) {
44
+ v->m_dependencies = nullptr ;
45
+ v->n_dependencies = 0 ;
46
+ v->m_body = nullptr ;
47
+ v->n_body = 0 ;
48
+ }
42
49
v_func_type->m_abi = ASR::abiType::Interactive;
43
- v->m_body = nullptr ;
44
- v->n_body = 0 ;
45
50
break ;
46
51
}
47
52
case (ASR::symbolType::Module) : {
Original file line number Diff line number Diff line change @@ -420,14 +420,6 @@ class VerifyVisitor : public BaseWalkVisitor<VerifyVisitor>
420
420
}
421
421
422
422
void visit_Function (const Function_t &x) {
423
- ASR::FunctionType_t* v_func_type = ASR::down_cast<ASR::FunctionType_t>(x.m_function_signature );
424
- if (v_func_type->m_abi == abiType::Interactive) {
425
- require (x.n_body == 0 ,
426
- " The Function::n_body should be 0 if abi set to Interactive" );
427
- require (x.m_body == nullptr ,
428
- " The Function::m_body should be null if abi set to Interactive" );
429
- return ;
430
- }
431
423
std::vector<std::string> function_dependencies_copy = function_dependencies;
432
424
function_dependencies.clear ();
433
425
function_dependencies.reserve (x.n_dependencies );
You can’t perform that action at this time.
0 commit comments