Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/libasr/asr_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1091,15 +1091,15 @@ static inline std::string extract_dim_value(ASR::expr_t* dim) {

static inline std::string type_encode_dims(size_t n_dims, ASR::dimension_t* m_dims )
{
std::string dims_str = "";
std::string dims_str = "[";
for( size_t i = 0; i < n_dims; i++ ) {
ASR::dimension_t dim = m_dims[i];
dims_str += "[";
// dims_str += extract_dim_value(dim.m_start);
// dims_str += ",";
dims_str += extract_dim_value(dim.m_length);
dims_str += "]";
if (i + 1 < n_dims) {
dims_str += ",";
}
}
dims_str += "]";
return dims_str;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_05-ec8fbd5.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"stdout": null,
"stdout_hash": null,
"stderr": "asr-arrays_05-ec8fbd5.stderr",
"stderr_hash": "b92b252106c95d1851599993abbedd755f2b3231f5b551b3af33b67e",
"stderr_hash": "4e5d42a186b8d82b484ec66ccc5a3b90da7e4be8a32bac26ea906198",
"returncode": 2
}
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_05-ec8fbd5.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ semantic error: Type mismatch in annotation-assignment, the types must be compat
--> tests/errors/arrays_05.py:6:5
|
6 | x: i16[5, 4] = empty([5, 3], dtype=int16)
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5][4]' and 'i16[5][3]')
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5,4]' and 'i16[5,3]')
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_06-fbb09a3.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"stdout": null,
"stdout_hash": null,
"stderr": "asr-arrays_06-fbb09a3.stderr",
"stderr_hash": "0cd2825fa152a45c868b7f54832a95d0f457be296143f28ce1909870",
"stderr_hash": "1fa3f5061a72f03c0678806c0460b9ec5caf01cbbd2f07a606f1057e",
"returncode": 2
}
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_06-fbb09a3.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ semantic error: Type mismatch in annotation-assignment, the types must be compat
--> tests/errors/arrays_06.py:6:5
|
6 | x: i16[5, 4] = empty([5, 4], dtype=int32)
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5][4]' and 'i32[5][4]')
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i16[5,4]' and 'i32[5,4]')
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_07-de430fd.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"stdout": null,
"stdout_hash": null,
"stderr": "asr-arrays_07-de430fd.stderr",
"stderr_hash": "ea9cadd25ae52d3ff115925e4f8e6feb278ad009410d64c940cf64ff",
"stderr_hash": "7fadea44b4ad8f383e0cadbd27a53eb3ab75f0edef98d27639527723",
"returncode": 2
}
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_07-de430fd.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ semantic error: Type mismatch in annotation-assignment, the types must be compat
--> tests/errors/arrays_07.py:6:5
|
6 | x: f32[5, 4] = empty([5, 4], dtype=complex64)
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('f32[5][4]' and 'c32[5][4]')
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('f32[5,4]' and 'c32[5,4]')
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_08-ba317a3.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"stdout": null,
"stdout_hash": null,
"stderr": "asr-arrays_08-ba317a3.stderr",
"stderr_hash": "a6fc0e1c661fab5e3ee0a034abb85d765a1dce515483a2a6191b2aa7",
"stderr_hash": "bedb87b219b7c49a18cced170e4ffcac780d242f70c3ae8bbfb27a26",
"returncode": 2
}
2 changes: 1 addition & 1 deletion tests/reference/asr-arrays_08-ba317a3.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ semantic error: Type mismatch in annotation-assignment, the types must be compat
--> tests/errors/arrays_08.py:9:5
|
9 | x: i64[p, q, r] = empty([q, p, r], dtype=int64)
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i64[100][120][200]' and 'i64[120][100][200]')
| ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type mismatch ('i64[100,120,200]' and 'i64[120,100,200]')