Skip to content

Commit

Permalink
[NF] Temporary hack to fix record issues.
Browse files Browse the repository at this point in the history
- Add local fields when converting record expressions to DAE form,
  due to an issue where the list of fields is sometimes taken from a
  record instance with the variability of the record component applied.
  • Loading branch information
perost committed Mar 10, 2020
1 parent 4ae88fc commit 491c0c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions OMCompiler/Compiler/NFFrontEnd/NFExpression.mo
Expand Up @@ -1829,6 +1829,13 @@ public
then
();

case Record.Field.LOCAL()
algorithm
field_names := field.name :: field_names;
dargs := toDAE(arg) :: dargs;
then
();

else ();
end match;
end for;
Expand Down
2 changes: 1 addition & 1 deletion testsuite/flattening/modelica/scodeinst/Makefile
Expand Up @@ -711,7 +711,6 @@ RecordBinding5.mo \
RecordBinding6.mo \
RecordBinding7.mo \
RecordConstructor1.mo \
RecordConstructor2.mo \
RecordExtends1.mo \
RecordExtends2.mo \
RecordUnknownDim1.mo \
Expand Down Expand Up @@ -881,6 +880,7 @@ OCGTests.mos \
# test that currently fail. Move up when fixed.
# Run make testfailing
FAILINGTESTFILES=\
RecordConstructor2.mo \
FinalParameter1.mo \
FinalParameter2.mo \
FinalParameter3.mo \
Expand Down

0 comments on commit 491c0c8

Please sign in to comment.