Skip to content

Commit

Permalink
[NF] Fix issue with converting functions to DAE.
Browse files Browse the repository at this point in the history
- Convert the function tree before everything else, to avoid function
  nodes being clobbered if the function is used as a type somewhere.

Belonging to [master]:
  - OpenModelica/OMCompiler#2303
  • Loading branch information
perost authored and OpenModelica-Hudson committed Mar 21, 2018
1 parent f7f4c35 commit 93b4018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/NFFrontEnd/NFConvertDAE.mo
Expand Up @@ -74,6 +74,8 @@ protected
list<DAE.Element> elems;
DAE.Element class_elem;
algorithm
daeFunctions := convertFunctionTree(functions);

elems := convertVariables(flatModel.variables, {});
elems := convertEquations(flatModel.equations, elems);
elems := convertInitialEquations(flatModel.initialEquations, elems);
Expand All @@ -83,8 +85,6 @@ algorithm
class_elem := DAE.COMP(name, elems, ElementSource.createElementSource(info), flatModel.comment);
dae := DAE.DAE({class_elem});

daeFunctions := convertFunctionTree(functions);

execStat(getInstanceName() + "(" + name + ")");
end convert;

Expand Down

0 comments on commit 93b4018

Please sign in to comment.