Skip to content

Commit

Permalink
[NF] Fix Expression.applySubscriptArray.
Browse files Browse the repository at this point in the history
- Fix the case for : in Expression.applySubscriptArray so that it
  actually applies the subscripts and not just pretends to do so.

Belonging to [master]:
  - OpenModelica/OMCompiler#2713
  • Loading branch information
perost authored and OpenModelica-Hudson committed Oct 10, 2018
1 parent 6506587 commit 89692f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/NFFrontEnd/NFExpression.mo
Expand Up @@ -970,7 +970,7 @@ public
input list<Subscript> restSubscripts;
output Expression outExp;
protected
Subscript sub;
Subscript sub, s;
list<Subscript> rest_subs;
list<Expression> expl;
Type ty;
Expand All @@ -987,6 +987,8 @@ public
outExp := exp;
else
ARRAY(ty = ty, elements = expl) := exp;
s :: rest_subs := restSubscripts;
expl := list(applySubscript(s, e, rest_subs) for e in expl);

el_count := listLength(expl);
ty := if el_count > 0 then typeOf(listHead(expl)) else
Expand Down

0 comments on commit 89692f5

Please sign in to comment.