Allow printing of null node in let binder (#5523)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Wed, 25 Nov 2020 06:30:56 +0000 (00:30 -0600)
committerGitHub <noreply@github.com>
Wed, 25 Nov 2020 06:30:56 +0000 (22:30 -0800)
src/printer/let_binding.cpp

index 439037b64d6242c3f14dbb3218e6df392b3f23cd..2efc98318313ab33ca6db3be42a3fffbd2af91a0 100644 (file)
@@ -30,8 +30,7 @@ uint32_t LetBinding::getThreshold() const { return d_thresh; }
 
 void LetBinding::process(Node n)
 {
-  Assert(!n.isNull());
-  if (d_thresh == 0)
+  if (n.isNull() || d_thresh == 0)
   {
     // value of 0 means do not introduce let
     return;
@@ -42,7 +41,6 @@ void LetBinding::process(Node n)
 
 void LetBinding::letify(Node n, std::vector<Node>& letList)
 {
-  Assert(!n.isNull());
   // first, push the context
   pushScope();
   // process the node