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
  • Loading branch information
Jens Frenkel committed Nov 1, 2010
1 parent d1ff158 commit 0ee5822
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/Expression.mo
Expand Up @@ -5738,7 +5738,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(name=_), cr) then false;
case (DAE.ARRAY(array = explist),cr)
equation
reslist = Util.listMap1(explist, expContains, cr);
Expand Down
9 changes: 9 additions & 0 deletions Compiler/ExpressionDump.mo
Expand Up @@ -1252,6 +1252,15 @@ algorithm
res_str = stringAppendList({gen_str,"BCONST ","true","\n"});
then
res_str;

case (DAE.ENUM_LITERAL(name = fcn, index = i), level)
equation
gen_str = genStringNTime(" |", level);
s = Absyn.pathString(fcn);
istr = intString(i);
res_str = stringAppendList({gen_str, "ENUM_LITERAL ", s, " [", istr, "]", "\n"});
then
res_str;

case (DAE.CREF(componentRef = c,ty=ty),level) /* Graphviz.LNODE(\"CREF\",{s},{},{}) */
equation
Expand Down

0 comments on commit 0ee5822

Please sign in to comment.