This repository was archived by the owner on May 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -1480,10 +1480,12 @@ algorithm
14801480 fail();
14811481 end if ;
14821482
1483+ orig_comp := InstNode . component(originalNode);
14831484 rdcl_type := InstNodeType . REDECLARED_COMP (InstNode . parent(originalNode));
14841485 rdcl_node := InstNode . setNodeType(rdcl_type, redeclareNode);
1486+ rdcl_node := InstNode . copyInstancePtr(originalNode, rdcl_node);
1487+ rdcl_node := InstNode . updateComponent(InstNode . component(redeclareNode), rdcl_node);
14851488 instComponent(rdcl_node, outerAttr, constrainingMod, true );
1486- orig_comp := InstNode . component(originalNode);
14871489 rdcl_comp := InstNode . component(rdcl_node);
14881490
14891491 new_comp := match (orig_comp, rdcl_comp)
Original file line number Diff line number Diff line change @@ -1552,6 +1552,26 @@ uniontype InstNode
15521552 else accumCmts;
15531553 end match;
15541554 end getComments;
1555+
1556+ function copyInstancePtr
1557+ input InstNode srcNode;
1558+ input output InstNode dstNode;
1559+ algorithm
1560+ () := match (srcNode, dstNode)
1561+ case (COMPONENT_NODE (), COMPONENT_NODE ())
1562+ algorithm
1563+ dstNode. component := srcNode. component;
1564+ then
1565+ ();
1566+
1567+ case (CLASS_NODE (), CLASS_NODE ())
1568+ algorithm
1569+ dstNode. cls := srcNode. cls;
1570+ then
1571+ ();
1572+
1573+ end match;
1574+ end copyInstancePtr;
15551575end InstNode ;
15561576
15571577annotation(__OpenModelica_Interface= "frontend" );
You can’t perform that action at this time.
0 commit comments