Skip to content

Commit 951305d

Browse files
committed
Use frontend independent type string in create_ListIndex
1 parent 3327373 commit 951305d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libasr/pass/intrinsic_function_registry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ static inline ASR::asr_t* create_ListIndex(Allocator& al, const Location& loc,
482482
ASR::ttype_t *list_type = ASR::down_cast<ASR::List_t>(type)->m_type;
483483
ASR::ttype_t *ele_type = ASRUtils::expr_type(args[1]);
484484
if (!ASRUtils::check_equal_type(ele_type, list_type)) {
485-
std::string fnd = ASRUtils::type_to_str_python(ele_type);
486-
std::string org = ASRUtils::type_to_str_python(list_type);
485+
std::string fnd = ASRUtils::get_type_code(ele_type);
486+
std::string org = ASRUtils::get_type_code(list_type);
487487
err(
488488
"Type mismatch in 'index', the types must be compatible "
489489
"(found: '" + fnd + "', expected: '" + org + "')", loc);

0 commit comments

Comments
 (0)