Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 983f52f

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
[NF] Fix type-checking of arrays with >1 dimension
Belonging to [master]: - #2233 - OpenModelica/OpenModelica-testsuite#859
1 parent ca288a2 commit 983f52f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Compiler/NFFrontEnd/NFTypeCheck.mo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,9 @@ algorithm
13261326
if isCompatibleMatch(matchKind) then
13271327
// The arrays must have the same number of dimensions.
13281328
if listLength(dims1) == listLength(dims2) then
1329+
// We lift the array which means we have to iterate in theopposite order
1330+
dims1 := listReverse(dims1);
1331+
dims2 := listReverse(dims2);
13291332
while not listEmpty(dims1) loop
13301333
dim1 :: dims1 := dims1;
13311334
dim2 :: dims2 := dims2;

0 commit comments

Comments
 (0)