Skip to content

Commit 39c0e90

Browse files
committed
DEV: Keep ArraySize node intact if not being created for an ASR type
1 parent a8fc698 commit 39c0e90

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7446,7 +7446,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
74467446
dim = ASRUtils::EXPR(ASR::make_IntegerBinOp_t(al, loc,
74477447
args[1].m_value, ASR::binopType::Add, const_one, int_type, nullptr));
74487448
}
7449-
tmp = ASRUtils::make_ArraySize_t_util(al, loc, var, dim, int_type, nullptr);
7449+
tmp = ASRUtils::make_ArraySize_t_util(al, loc, var, dim, int_type, nullptr, false);
74507450
return;
74517451
} else if (call_name == "empty") {
74527452
if (x.n_args != 1 || x.n_keywords != 1) {

src/lpython/semantics/python_attribute_eval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ struct AttributeHandler {
118118
throw SemanticError("array.size() takes no arguments", loc);
119119
}
120120
ASR::ttype_t *int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, loc, 4));
121-
return ASRUtils::make_ArraySize_t_util(al, loc, s, nullptr, int_type, nullptr);
121+
return ASRUtils::make_ArraySize_t_util(al, loc, s, nullptr, int_type, nullptr, false);
122122
}
123123

124124
static ASR::asr_t* eval_list_append(ASR::expr_t *s, Allocator &al, const Location &loc,

0 commit comments

Comments
 (0)