Skip to content

Commit

Permalink
- Fixed testcase Lookup10, which together with other recent fixes fix…
Browse files Browse the repository at this point in the history
…ed bug

  #1151: [http://openmodelica.ida.liu.se:8080/cb/issue/1151?navigation=true].
- Added RTOpts failtrace guard in Inst.partialInstClassIn.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5159 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Mar 17, 2010
1 parent b413d1a commit f27bf7c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Compiler/Inst.mo
Expand Up @@ -2494,7 +2494,8 @@ algorithm

case (cache,env,ih,mods,pre,csets,ci_state,(c as SCode.CLASS(name = n,restriction = r,classDef = d)),prot,inst_dims)
equation
Debug.fprintln("insttr", "- Inst.partialInstClassIn failed on class:" +&
true = RTOpts.debugFlag("failtrace");
Debug.traceln("- Inst.partialInstClassIn failed on class:" +&
n +& " in environment: " +& Env.printEnvPathStr(env));
then
fail();
Expand Down Expand Up @@ -4039,11 +4040,11 @@ algorithm
to the environment here.
*/
(cdefelts2,extcomps) = classdefElts2(extcomps, partialPrefix);
// lst_constantEls = listAppend(extcomps,lst_constantEls); // Adding this line breaks mofiles/ClassExtends3.mo
(env2,ih) = addClassdefsToEnv(env2,ih,cdefelts2,true,NONE); // Add inherited classes to env
(cache,env3,ih,_/*Skip collecting functions here, since partial */) = addComponentsToEnv(cache, env2, ih, mods, pre, csets, ci_state,
lst_constantEls, lst_constantEls, {},
inst_dims, false);
lst_constantEls = listAppend(extcomps,lst_constantEls);
(cache,env3,ih,_,_,_,ci_state2,_,_) =
instElementList(cache, env3, ih, UnitAbsyn.noStore, mods, pre, csets, ci_state1, lst_constantEls,
inst_dims, true, ConnectionGraph.EMPTY) "instantiate constants";
Expand Down

0 comments on commit f27bf7c

Please sign in to comment.