Skip to content

Commit

Permalink
- Fixed connecting components of deleted arrays.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15828 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Apr 16, 2013
1 parent d6c55d8 commit 1fc5d89
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Compiler/FrontEnd/ConnectUtil.mo
Expand Up @@ -854,10 +854,13 @@ protected function isDeletedComponent
"Checks if the given component is deleted or not."
input DAE.ComponentRef inComponent;
input SetTrie inSets;
protected
DAE.ComponentRef cr;
algorithm
// Send true as last argument to setTrieGet, so that it also matches any
// prefix of the cref in case the cref is a subcomponent of a deleted component.
Connect.SET_TRIE_DELETED(name = _) := setTrieGet(inComponent, inSets, true);
cr := ComponentReference.crefStripSubs(inComponent);
Connect.SET_TRIE_DELETED(name = _) := setTrieGet(cr, inSets, true);
end isDeletedComponent;

public function connectionContainsDeletedComponents
Expand All @@ -884,7 +887,7 @@ algorithm
then
true;

// Check if the false component is deleted.
// Check if the second component is deleted.
case (_, _, Connect.SETS(sets = sets))
equation
isDeletedComponent(inComponent2, sets);
Expand Down

0 comments on commit 1fc5d89

Please sign in to comment.