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

Commit

Permalink
[NF] Record fixes.
Browse files Browse the repository at this point in the history
- Use derived node when constructing record types.
- Don't rename imported nodes. They aren't used when creating the
  lookup trees anyway and just causes e.g. imported functions to be
  named incorrectly.

Belonging to [master]:
  - #2808
  • Loading branch information
perost authored and OpenModelica-Hudson committed Dec 3, 2018
1 parent 2661fa9 commit bccd64c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions Compiler/NFFrontEnd/NFImport.mo
Expand Up @@ -112,10 +112,7 @@ public
algorithm
node := match imp
case Absyn.Import.NAMED_IMPORT()
algorithm
node := Lookup.lookupImport(imp.path, scope, info);
then
InstNode.rename(imp.name, node);
then Lookup.lookupImport(imp.path, scope, info);

case Absyn.Import.QUAL_IMPORT()
then Lookup.lookupImport(imp.path, scope, info);
Expand Down
3 changes: 2 additions & 1 deletion Compiler/NFFrontEnd/NFInst.mo
Expand Up @@ -1879,7 +1879,8 @@ protected
ComplexType cty;
algorithm
cty := match restriction
case Restriction.RECORD() then makeRecordComplexType(node, cls);
case Restriction.RECORD()
then makeRecordComplexType(InstNode.classScope(InstNode.getDerivedNode(node)), cls);
else ComplexType.CLASS();
end match;

Expand Down

0 comments on commit bccd64c

Please sign in to comment.