Skip to content

Commit d9e3bef

Browse files
committed
Fix 1-dim array length in message
1 parent d3852a4 commit d9e3bef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libasr/asr_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,9 +1004,9 @@ static inline std::string type_python_1dim_helper(const std::string & res,
10041004
}
10051005

10061006
if( ASRUtils::expr_value(e->m_length) ) {
1007-
int64_t length_dim = -1;
1007+
int64_t length_dim = 0;
10081008
ASRUtils::extract_value(ASRUtils::expr_value(e->m_length), length_dim);
1009-
return res + "[" + std::to_string(length_dim + 1) + "]";
1009+
return res + "[" + std::to_string(length_dim) + "]";
10101010
}
10111011

10121012
return res;

0 commit comments

Comments
 (0)