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

Commit

Permalink
ticket:5144 do not expand complex array components
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - #2682
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Sep 30, 2018
1 parent b9307fb commit 43ad267
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Compiler/NFFrontEnd/NFFlatten.mo
Expand Up @@ -524,7 +524,18 @@ protected
RangeIterator range_iter;
Expression sub_exp;
list<Subscript> subs;
list<Variable> vrs;
algorithm
// if we don't scalarize flatten the class and then add dimensions to the types
if not Flags.isSet(Flags.NF_SCALARIZE) then
(vrs, sections) := flattenClass(cls, prefix, visibility, binding, {}, sections);
for v in vrs loop
v.ty := Type.liftArrayLeftList(v.ty, dimensions);
vars := v::vars;
end for;
return;
end if;

if listEmpty(dimensions) then
subs := listReverse(subscripts);
sub_pre := ComponentRef.setSubscripts(subs, prefix);
Expand Down

0 comments on commit 43ad267

Please sign in to comment.