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

Commit

Permalink
[NF] Fix builtin type attribute order.
Browse files Browse the repository at this point in the history
- Fix the order type attributes are scalarized so that each attribute
  is matched up with the correct name.

Belonging to [master]:
  - #2183
  - OpenModelica/OpenModelica-testsuite#849
  • Loading branch information
perost authored and OpenModelica-Hudson committed Feb 12, 2018
1 parent 3be99fe commit 71c5125
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Compiler/NFFrontEnd/NFScalarize.mo
Expand Up @@ -135,17 +135,19 @@ function scalarizeTypeAttributes
output list<String> names = {};
output array<ExpressionIterator> iters;
protected
Integer i = 1;
Integer len, i;
String name;
Binding binding;
algorithm
iters := arrayCreateNoInit(listLength(attrs), ExpressionIterator.NONE_ITERATOR());
len := listLength(attrs);
iters := arrayCreateNoInit(len, ExpressionIterator.NONE_ITERATOR());
i := len;

for attr in attrs loop
(name, binding) := attr;
names := name :: names;
arrayUpdate(iters, i, ExpressionIterator.fromBinding(binding));
i := i + 1;
i := i - 1;
end for;
end scalarizeTypeAttributes;

Expand Down

0 comments on commit 71c5125

Please sign in to comment.