Support assoc array methods with wide value types (#7680)

This commit is contained in:
pawelktk
2026-06-10 09:39:43 -04:00
committed by GitHub
parent d1319cf81e
commit 75993ca9ea
6 changed files with 261 additions and 8 deletions
+6
View File
@@ -4352,6 +4352,12 @@ class WidthVisitor final : public VNVisitor {
}
void methodCallAssoc(AstMethodCall* nodep, AstAssocArrayDType* adtypep) {
AstCMethodHard* newp = nullptr;
if (nodep->withp() && adtypep->subDTypep()->isWide()) {
nodep->v3warn(
E_UNSUPPORTED,
"Unsupported: `with` clause on assoc arrays with wide value types in method '"
<< nodep->prettyName() << "'");
}
if (nodep->name() == "num" // function int num()
|| nodep->name() == "size") {
methodOkArguments(nodep, 0, 0);