Skip to content

Commit

Permalink
simplify fetching expr_id for global in monomrphization
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Jan 9, 2025
1 parent 8d7f1f9 commit 1dd6ea8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions compiler/noirc_frontend/src/monomorphization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 my monomorphization");
};

self.expr(expr)?
}
DefinitionKind::Local(_) => match self.lookup_captured_expr(ident.id) {
Expand Down

0 comments on commit 1dd6ea8

Please sign in to comment.