Skip to content

Commit 45143ca

Browse files
author
Jens Frenkel
committed
- add missing Types to statementOutputs
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14845 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 8edd0b1 commit 45143ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Compiler/FrontEnd/CheckModel.mo

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,13 @@ algorithm
431431
(stmts,_) = DAEUtil.traverseDAEEquationsStmts(stmts,Expression.traverseSubexpressionsHelper,(Expression.replaceCref,(cr,e)));
432432
ht = List.fold(stmts,statementOutputs,iht);
433433
then ht;
434+
case(DAE.STMT_PARFOR(type_=tp, iter = iteratorName, range = e, statementLst = stmts),_)
435+
equation
436+
// replace the iterator variable with the range expression
437+
cr = ComponentReference.makeCrefIdent(iteratorName, tp, {});
438+
(stmts,_) = DAEUtil.traverseDAEEquationsStmts(stmts,Expression.traverseSubexpressionsHelper,(Expression.replaceCref,(cr,e)));
439+
ht = List.fold(stmts,statementOutputs,iht);
440+
then ht;
434441
case(DAE.STMT_WHILE(statementLst = stmts),_)
435442
equation
436443
ht = List.fold(stmts,statementOutputs,iht);
@@ -452,6 +459,7 @@ algorithm
452459
case(DAE.STMT_NORETCALL(exp = _),_) then iht;
453460
case(DAE.STMT_RETURN(_),_) then iht;
454461
case(DAE.STMT_BREAK(_),_) then iht;
462+
case(DAE.STMT_ARRAY_INIT(name=_),_) then iht;
455463
// MetaModelica extension. KS
456464
case(DAE.STMT_FAILURE(body = stmts),_)
457465
equation

0 commit comments

Comments
 (0)