Skip to content

Commit

Permalink
- Fixed infinite loop in Inst.updateCompeltsMods for Media models.
Browse files Browse the repository at this point in the history
- Added more redeclare test cases.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8479 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Apr 4, 2011
1 parent 00b4491 commit 5bd5f68
Show file tree
Hide file tree
Showing 2 changed files with 137 additions and 113 deletions.
4 changes: 2 additions & 2 deletions Compiler/FrontEnd/Inst.mo
Expand Up @@ -4898,7 +4898,7 @@ algorithm
then
(cache,env,ih,elMod::res,csets);

case (cache,env,ih,pre,((comp,cmod) :: xs),ci_state,csets,impl)
case (cache,env,ih,pre,((comp, cmod as DAE.MOD(subModLst = _)) :: xs),ci_state,csets,impl)
equation
info = Absyn.dummyInfo; // TODO: Get info from the comp? Is it always a COMPONENT?
umod = Mod.unelabMod(cmod);
Expand All @@ -4911,7 +4911,7 @@ algorithm
ltmod = Util.listMap1(crefs,getModsForDep,xs);
cmod2 = Util.listFold_3(ltmod,Mod.merge,DAE.NOMOD(),env,pre);

//print("("+&intString(listLength(ltmod))+&")UpdateCompeltsMods_(" +& Util.stringDelimitList(Util.listMap(crefs2,Absyn.printComponentRefStr),",") +& ") subs: " +& Util.stringDelimitList(Util.listMap(crefs,Absyn.printComponentRefStr),",")+& "\n");
//print("("+&intString(listLength(ltmod))+&")UpdateCompeltsMods_(" +& Util.stringDelimitList(Util.listMap(crefs,Absyn.printComponentRefStr),",") +& ") subs: " +& Util.stringDelimitList(Util.listMap(crefs,Absyn.printComponentRefStr),",")+& "\n");
//print(" acquired mods: " +& Mod.printModStr(cmod2) +& "\n");

(cache,env2,ih,csets) = updateComponentsInEnv(cache, env, ih, pre, cmod2, crefs, ci_state, csets, impl);
Expand Down

0 comments on commit 5bd5f68

Please sign in to comment.