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

Commit

Permalink
[NF] Collect more record constructors.
Browse files Browse the repository at this point in the history
- Collect record constructors from all cref expressions.

Belonging to [master]:
  - #2809
  • Loading branch information
perost authored and OpenModelica-Hudson committed Dec 3, 2018
1 parent bccd64c commit 809abfc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Compiler/NFFrontEnd/NFFlatten.mo
Expand Up @@ -1264,6 +1264,13 @@ algorithm
() := match ty
local
InstNode con, de;
Function fn;

case Type.FUNCTION(fn = fn)
algorithm
funcs := flattenFunction(fn, funcs);
then
();

// Collect external object structors.
case Type.COMPLEX(complexTy = ComplexType.EXTERNAL_OBJECT(constructor = con, destructor = de))
Expand Down Expand Up @@ -1492,9 +1499,9 @@ algorithm
then
();

case Expression.CREF(ty = Type.FUNCTION(fn = fn))
case Expression.CREF()
algorithm
funcs := flattenFunction(fn, funcs);
funcs := collectTypeFuncs(exp.ty, funcs);
then
();

Expand Down

0 comments on commit 809abfc

Please sign in to comment.