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

Commit f9edf28

Browse files
rfrankeOpenModelica-Hudson
authored andcommitted
Restrict collapse of arrays with same call on each element to previous
This is because many models fail that use other calls, like pre. Belonging to [master]: - #2645
1 parent 1fd1dd9 commit f9edf28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Compiler/BackEnd/BackendDAETransform.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ algorithm
865865
(exp1::exps) := Expression.flattenArrayExpToList(e);
866866
(cr1, call1) := match exp1
867867
case DAE.CREF(componentRef=cr1) then (cr1, "");
868-
case DAE.CALL(path=Absyn.IDENT(name=call1), expLst={DAE.CREF(componentRef=cr1)}) then (cr1, call1);
868+
case DAE.CALL(path=Absyn.IDENT(name="previous"), expLst={DAE.CREF(componentRef=cr1)}) then (cr1, "previous");
869869
else fail();
870870
end match;
871871
// Check that the first element starts at index [1,...,1]
@@ -881,7 +881,7 @@ algorithm
881881
//DAE.CREF(componentRef=cr2) := exp;
882882
(cr2, call2) := match exp
883883
case DAE.CREF(componentRef=cr2) then (cr2, "");
884-
case DAE.CALL(path=Absyn.IDENT(name=call2), expLst={DAE.CREF(componentRef=cr2)}) then (cr2, call2);
884+
case DAE.CALL(path=Absyn.IDENT(name="previous"), expLst={DAE.CREF(componentRef=cr2)}) then (cr2, "previous");
885885
else fail();
886886
end match;
887887
true := ndim==listLength(ComponentReference.crefLastSubs(cr2));

0 commit comments

Comments
 (0)