Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Fix enumeration index for arrays of enumerations


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14168 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 30, 2012
1 parent 8afb9af commit e0a78f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Static.mo
Expand Up @@ -177,7 +177,7 @@ algorithm
path = Absyn.crefToPath(cr);
(path1,Absyn.IDENT(name)) = Absyn.splitQualAndIdentPath(path);
true = Absyn.pathEqual(path1,path2);
ix = List.position(name,names);
ix = List.position(name,names)+1;
exp = DAE.ENUM_LITERAL(path,ix);
p = DAE.PROP(ty,DAE.C_CONST());
(cache,exps,props,st_2) = elabExpList2(cache,env, rest, ty, impl, st,doVect,pre,info);
Expand Down
3 changes: 2 additions & 1 deletion Compiler/Template/ExpressionDumpTpl.tpl
Expand Up @@ -13,7 +13,8 @@ match exp
let str = escapedString(string,false)
'<%stringDelimiter%><%str%><%stringDelimiter%>'
case BCONST(__) then bool
case ENUM_LITERAL(__) then AbsynDumpTpl.dumpPath(name)
case ENUM_LITERAL(__) then
if typeinfo() then '/* <%index%> */' + AbsynDumpTpl.dumpPath(name)
case CREF(__) then dumpCref(componentRef)
case e as BINARY(__) then
let lhs_str = dumpOperand(exp1, e, true)
Expand Down

0 comments on commit e0a78f5

Please sign in to comment.