Skip to content

Commit a3c5220

Browse files
authored
Merge pull request #2062 from Shaikh-Ubaid/fix_warn
Build: Fix warning in debug mode
2 parents 9ab24f5 + dda5ebb commit a3c5220

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3830,7 +3830,8 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
38303830
tmp0 = ASR::make_TranslationUnit_t(al, x.base.base.loc,
38313831
current_scope, nullptr, 0);
38323832
}
3833-
LCOMPILERS_ASSERT(ASR::is_a<ASR::TranslationUnit_t>(*tmp0));
3833+
LCOMPILERS_ASSERT(ASR::is_a<ASR::unit_t>(*tmp0) &&
3834+
ASR::is_a<ASR::TranslationUnit_t>(*ASR::down_cast<ASR::unit_t>(tmp0)));
38343835
global_scope = current_scope;
38353836

38363837
ASR::Module_t* module_sym = nullptr;

0 commit comments

Comments
 (0)