Skip to content

Commit

Permalink
Fix for issue #2024:
Browse files Browse the repository at this point in the history
- Fixed cref expansion for qualified crefs with subscripts.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14813 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Jan 17, 2013
1 parent 50df299 commit 9e05358
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
16 changes: 2 additions & 14 deletions Compiler/FrontEnd/ComponentReference.mo
Expand Up @@ -2529,9 +2529,8 @@ algorithm
then
crefs;

// this case is needed because there is an error somewhere destroying the array type
// A qualified cref with type complex.
case (DAE.CREF_QUAL(id, ty as DAE.T_COMPLEX(complexClassType=_), subs, cref),true)
// A qualified cref with scalar type.
case (DAE.CREF_QUAL(id, ty, subs, cref),_)
equation
// Expand the rest of the cref.
crefs = expandCref_impl(cref,expandRecord);
Expand All @@ -2540,17 +2539,6 @@ algorithm
then
crefs;


// A qualified cref with no subscripts and scalar type.
case (DAE.CREF_QUAL(id, ty, {}, cref),_)
equation
// Expand the rest of the cref.
crefs = expandCref_impl(cref,expandRecord);
// Append the head of this cref to all of the generated crefs.
crefs = List.map3r(crefs, makeCrefQual, id, ty, {});
then
crefs;

// All other cases, no expansion.
else {inCref};

Expand Down
1 change: 0 additions & 1 deletion Compiler/FrontEnd/ConnectUtil.mo
Expand Up @@ -225,7 +225,6 @@ public function addConnection
input SCode.ConnectorType inConnectorType;
input DAE.ElementSource inSource;
output Sets outSets;
protected
algorithm
outSets := match(inSets, inCref1, inFace1, inCref2, inFace2, inConnectorType, inSource)
local
Expand Down

0 comments on commit 9e05358

Please sign in to comment.