Fix randomize treated as std::randomize in classes (#5436)

This commit is contained in:
Arkadiusz Kozdra
2024-09-10 09:10:36 -04:00
committed by GitHub
parent 2f690c0530
commit ef259f63ca
7 changed files with 75 additions and 21 deletions
+1 -8
View File
@@ -113,14 +113,7 @@ class LinkResolveVisitor final : public VNVisitor {
// NodeTask: Remember its name for later resolution
if (m_underGenerate) nodep->underGenerate(true);
// Remember the existing symbol table scope
if (m_classp) {
if (nodep->name() == "randomize" || nodep->name() == "srandom") {
nodep->v3error(nodep->prettyNameQ()
<< " is a predefined class method; redefinition not allowed"
" (IEEE 1800-2023 18.6.3)");
}
nodep->classMethod(true);
}
if (m_classp) nodep->classMethod(true);
// V3LinkDot moved the isExternDef into the class, the extern proto was
// checked to exist, and now isn't needed
nodep->isExternDef(false);