Skip to content

Commit

Permalink
Add MetaModelica records to the map as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
mahge committed Sep 25, 2022
1 parent 40d42e2 commit b013cbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OMCompiler/Compiler/SimCode/SimCodeFunctionUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1678,6 +1678,7 @@ algorithm
fieldNames = List.map(varlst, generateVarName);
accRecDecls = SimCodeFunction.RECORD_DECL_DEF(path, fieldNames) :: accRecDecls;
rt_1 = sname::rt;
UnorderedMap.add(sname, SimCodeFunction.RECORD_DECL_DEF(path, fieldNames), declMap);
(accRecDecls, rt_1) = elaborateNestedRecordDeclarations(varlst, accRecDecls, rt_1, declMap);
else
rt_1 = rt;
Expand Down Expand Up @@ -1878,6 +1879,7 @@ algorithm
b = listMember(name, rt);
accRecDecls = List.consOnTrue(not b, SimCodeFunction.RECORD_DECL_DEF(path, fieldNames), accRecDecls);
rt_1 = List.consOnTrue(not b, name, rt);
UnorderedMap.add(name, SimCodeFunction.RECORD_DECL_DEF(path, fieldNames), declMap);
(accRecDecls, rt_2) = elaborateRecordDeclarationsForMetarecords(rest, accRecDecls, rt_1, declMap);
then (accRecDecls, rt_2);
case (_::rest, accRecDecls, rt)
Expand Down

0 comments on commit b013cbf

Please sign in to comment.