Skip to content

Allow methodcall and new to access interface arrays #5973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

nbstrike
Copy link
Contributor

@nbstrike nbstrike commented May 2, 2025

Handle de-array case so that new and methods can access interfaces from an array.

…gnment should not be a non-virtual interface.
Copy link
Member

@wsnyder wsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Please resolve the test conflict.

@wsnyder
Copy link
Member

wsnyder commented May 11, 2025

Let me know when ready for another review - first click "resolved" on above, remove commented-out code, and do a "make format" please.

@nbstrike
Copy link
Contributor Author

This should be ready for another review, I'm slightly surprised that 'make format' has apparently run itself!

Copy link
Member

@wsnyder wsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The autoformatter is cancelling the regression run, so you need to run it on your side and push.

src/V3Inst.cpp Outdated
// copy between arrays
if (!VN_IS(lhsarrp->subDTypep()->skipRefp(), IfaceRefDType)) return;
if (!VN_IS(rhsarrp->subDTypep()->skipRefp(), IfaceRefDType)) return;
if (VN_AS(rhsarrp->subDTypep()->skipRefp(), IfaceRefDType)->isVirtual())
return;
if (!VN_AS(lhsarrp->subDTypep()->skipRefp(), IfaceRefDType)->isVirtual()) {
nodep->lhsp()->v3error("Illegal target of assignment");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Illegal or unsupported? Can it turn up if something unexpected like a queue is involved? Add the types to the error so more obvious? (prettyDTypeNameQ())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants