Fix handling of static keyword in methods (#4649)

This commit is contained in:
Ryszard Rozak
2023-10-31 08:15:54 -04:00
committed by GitHub
parent a27abab65f
commit a764c70b4a
14 changed files with 60 additions and 34 deletions
+2 -1
View File
@@ -3185,7 +3185,7 @@ private:
AstNodeFTask* const taskp
= foundp ? VN_CAST(foundp->nodep(), NodeFTask) : nullptr; // Maybe nullptr
if (taskp) {
if (staticAccess && !taskp->lifetime().isStatic()) {
if (staticAccess && !taskp->isStatic()) {
// TODO bug4077
// nodep->v3error("Static access to non-static task/function "
// << taskp->prettyNameQ() << endl);
@@ -3358,6 +3358,7 @@ private:
// External definition cannot have any specifiers, so no value will be overwritten.
nodep->isHideLocal(funcProtop->isHideLocal());
nodep->isHideProtected(funcProtop->isHideProtected());
nodep->isStatic(funcProtop->isStatic());
nodep->isVirtual(funcProtop->isVirtual());
nodep->lifetime(funcProtop->lifetime());
} else {