Skip to content

Commit a8123ef

Browse files
committed
Fix for #2995:
- Don't try to expand already expanded equations. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23507 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent e40f9fb commit a8123ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Compiler/FrontEnd/InstSection.mo

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4931,6 +4931,8 @@ algorithm
49314931
Absyn.Path name;
49324932
list<String> ls;
49334933

4934+
case (_, DAE.ARRAY(array = outExpl)) then outExpl;
4935+
49344936
// Empty integer list. List.intRange is not defined for size < 1,
49354937
// so we need to handle empty lists here.
49364938
case (DAE.DIM_INTEGER(integer = 0), _) then {};
@@ -4942,7 +4944,8 @@ algorithm
49424944
expl;
49434945
case (DAE.DIM_BOOLEAN(), _)
49444946
equation
4945-
expl = DAE.BCONST(false)::DAE.BCONST(true)::{};
4947+
expl = {ExpressionSimplify.simplify1(Expression.makeASUB(inArray, {DAE.BCONST(false)})),
4948+
ExpressionSimplify.simplify1(Expression.makeASUB(inArray, {DAE.BCONST(true)}))};
49464949
then
49474950
expl;
49484951
case (DAE.DIM_ENUM(enumTypeName = name, literals = ls), _)

0 commit comments

Comments
 (0)