Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
[NF] Include root name when creating complex DAE types.
Browse files Browse the repository at this point in the history
- The root is included when creating e.g. record constructors, so the
  created DAE types must match. Not including the root in either case
  could cause name conflicts.

Belonging to [master]:
  - #2811
  • Loading branch information
perost authored and OpenModelica-Hudson committed Dec 3, 2018
1 parent 99e1c39 commit 8b10a66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Compiler/NFFrontEnd/NFInstNode.mo
Expand Up @@ -1384,7 +1384,8 @@ uniontype InstNode

else
algorithm
state := Restriction.toDAE(Class.restriction(cls), scopePath(clsNode));
state := Restriction.toDAE(Class.restriction(cls),
scopePath(clsNode, includeRoot = true));
then
DAE.Type.T_COMPLEX(state, {}, NONE());

Expand Down Expand Up @@ -1426,7 +1427,8 @@ uniontype InstNode

else
algorithm
state := Restriction.toDAE(Class.restriction(cls), scopePath(clsNode));
state := Restriction.toDAE(Class.restriction(cls),
scopePath(clsNode, includeRoot = true));
vars := ConvertDAE.makeTypeVars(clsNode);
outType := DAE.Type.T_COMPLEX(state, vars, NONE());
Pointer.update(clsNode.cls, Class.DAE_TYPE(outType));
Expand Down

0 comments on commit 8b10a66

Please sign in to comment.