Support parameter access from arrays of interfaces, #2155.

This commit is contained in:
Todd Strader
2020-02-06 19:19:23 -05:00
parent 609a5dc26d
commit 77f1b3eef4
4 changed files with 44 additions and 8 deletions
+8 -1
View File
@@ -355,9 +355,16 @@ private:
if (VN_IS(backp, Var)
&& VN_CAST(backp, Var)->isIfaceRef()
&& VN_CAST(backp, Var)->childDTypep()
&& VN_CAST(VN_CAST(backp, Var)->childDTypep(), IfaceRefDType)) {
&& (VN_CAST(VN_CAST(backp, Var)->childDTypep(), IfaceRefDType)
|| (VN_CAST(VN_CAST(backp, Var)->childDTypep(), UnpackArrayDType)
&& VN_CAST(VN_CAST(backp, Var)->childDTypep()->getChildDTypep(),
IfaceRefDType)))) {
AstIfaceRefDType* ifacerefp
= VN_CAST(VN_CAST(backp, Var)->childDTypep(), IfaceRefDType);
if (!ifacerefp) {
ifacerefp = VN_CAST(VN_CAST(backp, Var)->childDTypep()->getChildDTypep(),
IfaceRefDType);
}
// Interfaces passed in on the port map have ifaces
if (AstIface* ifacep = ifacerefp->ifacep()) {
if (dotted == backp->name()) {