diff --git a/src/V3AssertNfa.cpp b/src/V3AssertNfa.cpp index 2bd03e9d4..8c4a07d5d 100644 --- a/src/V3AssertNfa.cpp +++ b/src/V3AssertNfa.cpp @@ -2947,11 +2947,10 @@ class AssertNfaVisitor final : public VNVisitor { // Recursion guard: IEEE 1800-2023 16.12.1 forbids recursive properties. // V3Width emits "Recursive property call" for direct recursion before this // pass runs; this catches any nested-inlining cycle that slips past. - if (m_inliningProps.count(propyp)) { + if (!m_inliningProps.emplace(propyp).second) { funcrefp->v3error("Illegal recursive property reference"); // LCOV_EXCL_LINE return; // LCOV_EXCL_LINE } - m_inliningProps.insert(propyp); struct Guard final { std::set& setr; const AstProperty* keyp;