diff --git a/compiler/noirc_frontend/src/monomorphization/mod.rs b/compiler/noirc_frontend/src/monomorphization/mod.rs index ce855f6252..c3a32f979d 100644 --- a/compiler/noirc_frontend/src/monomorphization/mod.rs +++ b/compiler/noirc_frontend/src/monomorphization/mod.rs @@ -934,11 +934,9 @@ impl<'interner> Monomorphizer<'interner> { .into_hir_expression(self.interner, global.location) .map_err(MonomorphizationError::InterpreterError)? } else { - let let_ = self.interner.get_global_let_statement(*global_id).expect( - "Globals should have a corresponding let statement by monomorphization", - ); - let_.expression + unreachable!("All global values should be resolved at compile time and before monomorphization"); }; + self.expr(expr)? } DefinitionKind::Local(_) => match self.lookup_captured_expr(ident.id) {