From 0f5c4be90ccfdccc0a1aeda36a5c5ae61533d6cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=96stlund?= Date: Wed, 30 Jan 2019 12:30:18 +0100 Subject: [PATCH] [NF] Handle inner/outer in records. Belonging to [master]: - OpenModelica/OMCompiler#2908 --- Compiler/NFFrontEnd/NFRecord.mo | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Compiler/NFFrontEnd/NFRecord.mo b/Compiler/NFFrontEnd/NFRecord.mo index d43a1d9e14..e69348e26f 100644 --- a/Compiler/NFFrontEnd/NFRecord.mo +++ b/Compiler/NFFrontEnd/NFRecord.mo @@ -163,22 +163,23 @@ function collectRecordParam input output list locals; protected Component comp; + InstNode comp_node = InstNode.resolveInner(component); algorithm - if InstNode.isEmpty(component) then + if InstNode.isEmpty(comp_node) then return; end if; - if InstNode.isProtected(component) then - locals := component :: locals; + if InstNode.isProtected(comp_node) then + locals := comp_node :: locals; return; end if; - comp := InstNode.component(component); + comp := InstNode.component(comp_node); if Component.isConst(comp) and Component.hasBinding(comp) then - locals := component :: locals; + locals := comp_node :: locals; else - inputs := component :: inputs; + inputs := comp_node :: inputs; end if; end collectRecordParam;