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

Commit 232b213

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Fix simplification of transpose.
- Check that the second dimension of the argument to transpose is also expanded before trying to simplify the call. Belonging to [master]: - #2659
1 parent 049ab69 commit 232b213

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Compiler/NFFrontEnd/NFSimplifyExp.mo

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ function simplifyTranspose
259259
output Expression exp;
260260
algorithm
261261
exp := match arg
262-
case Expression.ARRAY() then Expression.transposeArray(arg);
262+
case Expression.ARRAY()
263+
guard List.all(arg.elements, Expression.isArray)
264+
then Expression.transposeArray(arg);
265+
263266
else Expression.CALL(call);
264267
end match;
265268
end simplifyTranspose;

0 commit comments

Comments
 (0)