Skip to content

Commit

Permalink
Return form the function if resolved
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Dec 16, 2024
1 parent 2770536 commit 9cf75da
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/V3LinkDot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3298,12 +3298,14 @@ class LinkDotResolveVisitor final : public VNVisitor {
}

if (nodep->name() == "local::") {
if (!m_randSymp && !m_ds.m_unresolvedClass) {
// m_randSymp is not set in the 1st pass of V3LinkDot
// if randomize is called on a parameterized class
nodep->v3error("Illegal 'local::' outside 'randomize() with'"
" (IEEE 1800-2023 18.7.1)");
m_ds.m_dotErr = true;
if (!m_randSymp) {
if (!m_ds.m_unresolvedClass) {
// m_randSymp is not set in the 1st pass of V3LinkDot
// if randomize is called on a parameterized class
nodep->v3error("Illegal 'local::' outside 'randomize() with'"
" (IEEE 1800-2023 18.7.1)");
m_ds.m_dotErr = true;
}
return;
}
}
Expand Down

0 comments on commit 9cf75da

Please sign in to comment.