From c2bd35d2775320cb006ea2650ef837c7c6616a0e Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 2 Oct 2019 19:30:47 -0700 Subject: [PATCH] Fix assertion in error recovery. (cherry picked from commit 4f48a7ed412ba82fab206c40e71cbbb56b37710a) --- PExpr.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PExpr.cc b/PExpr.cc index bce998419..b358542b5 100644 --- a/PExpr.cc +++ b/PExpr.cc @@ -126,9 +126,8 @@ PEBinary::~PEBinary() void PEBinary::declare_implicit_nets(LexicalScope*scope, NetNet::Type type) { - assert(left_ && right_); - left_->declare_implicit_nets(scope, type); - right_->declare_implicit_nets(scope, type); + if (left_) left_->declare_implicit_nets(scope, type); + if (right_) right_->declare_implicit_nets(scope, type); } bool PEBinary::has_aa_term(Design*des, NetScope*scope) const