Skip to content

Commit db24052

Browse files
committed
fix: do not check for same scope when class is imported from different module
1 parent 8982537 commit db24052

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libasr/asr_verify.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,10 @@ class VerifyVisitor : public BaseWalkVisitor<VerifyVisitor>
10901090
if( ASRUtils::get_asr_owner(x.m_derived_type) ) {
10911091
symbol_owner = ASRUtils::symbol_name(ASRUtils::get_asr_owner(x.m_derived_type));
10921092
}
1093+
// Check if x.m_derived_type is imported from another module as an external symbol.
1094+
if( !ASR::is_a<ASR::ExternalSymbol_t>(*x.m_derived_type) ) {
1095+
return;
1096+
}
10931097
require(symtab_in_scope(current_symtab, x.m_derived_type),
10941098
"Struct::m_derived_type '" +
10951099
std::string(ASRUtils::symbol_name(x.m_derived_type)) +

0 commit comments

Comments
 (0)