Skip to content

Commit

Permalink
chore: Only resolved globals monomorphization (#7006)
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm authored Jan 9, 2025
1 parent c4512d9 commit fc61c21
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 at compile time and before monomorphization");
};

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

0 comments on commit fc61c21

Please sign in to comment.