Skip to content

Commit

Permalink
Detect enumeration type in arrays as well
Browse files Browse the repository at this point in the history
This is the same as for any basic type.

Belonging to [master]:
  - OpenModelica/OMCompiler#2712
  • Loading branch information
rfranke authored and OpenModelica-Hudson committed Oct 10, 2018
1 parent d7274ca commit 6506587
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Types.mo
Expand Up @@ -844,7 +844,7 @@ public function isEnumeration "Return true if Type is the builtin String type."
input DAE.Type inType;
output Boolean outBoolean;
algorithm
outBoolean := match(inType)
outBoolean := match(arrayElementType(inType))
case (DAE.T_ENUMERATION()) then true;
else false;
end match;
Expand Down
2 changes: 2 additions & 0 deletions Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -7076,6 +7076,8 @@ algorithm
elseif isConst then
addSimVar(simVar, SimVarsIndex.stringConst, simVars);
end if;
else
Error.addInternalError("Failed to find SimVar list for Var: " + BackendDump.varString(dlowVar), sourceInfo());
end if;
// external objects
elseif BackendVariable.isExtObj(dlowVar) then
Expand Down

0 comments on commit 6506587

Please sign in to comment.