diff --git a/compiler/noirc_frontend/src/node_interner.rs b/compiler/noirc_frontend/src/node_interner.rs index e28a0a64ad..c223017d75 100644 --- a/compiler/noirc_frontend/src/node_interner.rs +++ b/compiler/noirc_frontend/src/node_interner.rs @@ -891,8 +891,9 @@ impl NodeInterner { match def { Node::Statement(hir_stmt) => match hir_stmt { HirStatement::Let(let_stmt) => Some(let_stmt.clone()), - _ => { - panic!("ice: all globals should correspond to a let statement in the interner") + HirStatement::Error => None, + other => { + panic!("ice: all globals should correspond to a let statement in the interner: {other:?}") } }, _ => panic!("ice: all globals should correspond to a statement in the interner"),