Skip to content

Commit

Permalink
Update compiler/noirc_frontend/src/elaborator/types.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher authored Jul 31, 2024
1 parent 5502f18 commit 2fa963c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/elaborator/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,8 @@ impl<'context> Elaborator<'context> {
Type::TypeVariable(_, _) => {
// NOTE: in reality the expected type can also include bool, but for the compiler's simplicity
// we only allow integer types. If a bool is in `from` it will need an explicit type annotation.
let expected = &&Type::polymorphic_integer_or_field(self.interner);
self.unify(from, expected, || TypeCheckError::InvalidCast {
let expected = Type::polymorphic_integer_or_field(self.interner);
self.unify(from, &expected, || TypeCheckError::InvalidCast {
from: from.clone(),
span,
});
Expand Down

0 comments on commit 2fa963c

Please sign in to comment.