Skip to content

Commit

Permalink
Bug fix for expContains, added missing case for ENUM_LITERAL.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6814 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Otto Tronarp committed Nov 1, 2010
1 parent 0452c4b commit 2993f56
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Compiler/Exp.mo
Expand Up @@ -10059,7 +10059,18 @@ algorithm
res_str = System.stringAppendList({gen_str,"BCONST ","true","\n"});
then
res_str;

case (DAE.ENUM_LITERAL(name = name, index = index), level)
local
Absyn.Path name;
Integer index;
String indexStr;
equation
gen_str = genStringNTime(" |", level);
s = Absyn.pathString(name);
indexStr = intString(index);
res_str = System.stringAppendList({gen_str, "ENUM_LITERAL ", s, " [", indexStr, "]", "\n"});
then
res_str;
case (DAE.CREF(componentRef = c,ty=ty),level) /* Graphviz.LNODE(\"CREF\",{s},{},{}) */
equation
gen_str = genStringNTime(" |", level);
Expand Down Expand Up @@ -10705,6 +10716,7 @@ algorithm
case (DAE.RCONST(real = _),cr) then false;
case (DAE.SCONST(string = _),cr) then false;
case (DAE.BCONST(bool = _),cr) then false;
case (DAE.ENUM_LITERAL(_, _), cr) then false;
case (DAE.ARRAY(array = explist),cr)
equation
reslist = Util.listMap1(explist, expContains, cr);
Expand Down

0 comments on commit 2993f56

Please sign in to comment.