diff --git a/compiler/noirc_frontend/src/hir/comptime/interpreter.rs b/compiler/noirc_frontend/src/hir/comptime/interpreter.rs index ffb759e74a2..7205242ead9 100644 --- a/compiler/noirc_frontend/src/hir/comptime/interpreter.rs +++ b/compiler/noirc_frontend/src/hir/comptime/interpreter.rs @@ -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),