Skip to content

Commit

Permalink
fix: Fix panic in comptime code (#6361)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher authored Oct 25, 2024
1 parent 308717b commit 2f37610
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/hir/comptime/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ impl<'local, 'interner> Interpreter<'local, 'interner> {
match &definition.kind {
DefinitionKind::Function(function_id) => {
let typ = self.elaborator.interner.id_type(id).follow_bindings();
let bindings =
Rc::new(self.elaborator.interner.get_instantiation_bindings(id).clone());
let bindings = self.elaborator.interner.try_get_instantiation_bindings(id);
let bindings = Rc::new(bindings.map_or(TypeBindings::default(), Clone::clone));
Ok(Value::Function(*function_id, typ, bindings))
}
DefinitionKind::Local(_) => self.lookup(&ident),
Expand Down

0 comments on commit 2f37610

Please sign in to comment.