diff --git a/include/slang/ast/Compilation.h b/include/slang/ast/Compilation.h index 88b329e7e..1c79c418f 100644 --- a/include/slang/ast/Compilation.h +++ b/include/slang/ast/Compilation.h @@ -739,7 +739,7 @@ class SLANG_EXPORT Compilation : public BumpAllocator { private: friend class Lookup; friend class Scope; - friend class DiagnosticVisitor; + friend struct DiagnosticVisitor; // Collected information about a resolved bind directive. struct ResolvedBind { diff --git a/source/ast/symbols/BlockSymbols.cpp b/source/ast/symbols/BlockSymbols.cpp index 88a311e1d..0c05a8ef1 100644 --- a/source/ast/symbols/BlockSymbols.cpp +++ b/source/ast/symbols/BlockSymbols.cpp @@ -191,6 +191,8 @@ StatementBlockSymbol& StatementBlockSymbol::fromSyntax(const Scope& scope, block->setAttributes(scope, syntax.attributes); block->blocks = Statement::createAndAddBlockItems(*block, *syntax.statement, /* labelHandled */ false); + + SLANG_ASSERT(curr && first); curr->addMember(*block); return *first;