Skip to content

Commit

Permalink
Fix bug in unifying TVKind::Integer
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher committed Feb 15, 2024
1 parent 302737e commit 6bc4e23
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/noirc_frontend/src/hir_def/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down

0 comments on commit 6bc4e23

Please sign in to comment.