Skip to content

Commit

Permalink
Fixes for bug: #1637
Browse files Browse the repository at this point in the history
- commented out the first case in Static.makeIfexp (thanks to Martin for pointing it out).
    case (cache,env,e1,DAE.PROP(type_ = (DAE.T_BOOL(varLstBool = _),_),constFlag = c1),
                    e2,DAE.PROP(type_ = t2,constFlag = c2),e3,DAE.PROP(type_ = t3,constFlag = c3),impl,st,_, _)
      equation
        true = Types.semiEquivTypes(t2, t3);
        c = constIfexp(e1, c1, c2, c3);
        (cache,exp) = cevalIfexpIfConstant(cache,env, e1, e2, e3, c1, impl, st, inInfo);
      then
        (cache,exp,DAE.PROP(t2,c));
- all tests go.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10132 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Oct 15, 2011
1 parent 1233674 commit 03f37fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/FrontEnd/Static.mo
Expand Up @@ -11505,14 +11505,16 @@ algorithm
Env.Cache cache;
Prefix.Prefix pre;

/*
case (cache,env,e1,DAE.PROP(type_ = (DAE.T_BOOL(varLstBool = _),_),constFlag = c1),e2,DAE.PROP(type_ = t2,constFlag = c2),e3,DAE.PROP(type_ = t3,constFlag = c3),impl,st,_, _)
equation
true = Types.semiEquivTypes(t2, t3);
c = constIfexp(e1, c1, c2, c3);
(cache,exp) = cevalIfexpIfConstant(cache,env, e1, e2, e3, c1, impl, st, inInfo);
then
(cache,exp,DAE.PROP(t2,c));

*/

case (cache,env,e1,DAE.PROP(type_ = (DAE.T_BOOL(varLstBool = _),_),constFlag = c1),e2,DAE.PROP(type_ = t2,constFlag = c2),e3,DAE.PROP(type_ = t3,constFlag = c3),impl,st,_, _)
equation
(e2_1,t2_1) = Types.matchType(e2, t2, t3, true);
Expand Down

0 comments on commit 03f37fb

Please sign in to comment.