From 6bc4e2364019c23fde88eb6c50f67713bd33bd17 Mon Sep 17 00:00:00 2001 From: Jake Fecher Date: Thu, 15 Feb 2024 09:09:36 -0600 Subject: [PATCH] Fix bug in unifying TVKind::Integer --- compiler/noirc_frontend/src/hir_def/types.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/noirc_frontend/src/hir_def/types.rs b/compiler/noirc_frontend/src/hir_def/types.rs index 31350fade90..2a0bc257181 100644 --- a/compiler/noirc_frontend/src/hir_def/types.rs +++ b/compiler/noirc_frontend/src/hir_def/types.rs @@ -984,7 +984,11 @@ impl Type { let this = self.substitute(bindings).follow_bindings(); match &this { - Type::FieldElement | Type::Integer(..) => { + Type::Integer(..) => { + bindings.insert(target_id, (var.clone(), this)); + Ok(()) + } + Type::FieldElement if !only_integer => { bindings.insert(target_id, (var.clone(), this)); Ok(()) }