Skip to content

Commit

Permalink
Do not try to ceval constants since they might become different const…
Browse files Browse the repository at this point in the history
…ants (unknown type dimension-0 arrays, etc). Should possibly apply for Value in general, storing its type so these errors don't occur in the future.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16172 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 31, 2013
1 parent d0229bc commit 71e5071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Compiler/FrontEnd/Static.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9579,12 +9579,13 @@ algorithm
case (_,_,_,_,_,_,_)
equation
true = Types.isParameterOrConstant(const);
false = Expression.isConst(inExp);
(outCache, val, _) = Ceval.ceval(inCache, inEnv, inExp, false, NONE(), Ceval.MSG(info), 0);
outExp = ValuesUtil.valueExp(val);
then (outCache,outExp);
case (_,_,_,_,_,_,_)
equation
true = Types.isParameterOrConstant(const) or Types.isExternalObject(ty);
true = Types.isParameterOrConstant(const) or Types.isExternalObject(ty) or Expression.isConst(inExp);
then (inCache,inExp);
else
equation
Expand Down

0 comments on commit 71e5071

Please sign in to comment.