diff --git a/crates/noirc_frontend/src/hir/type_check/expr.rs b/crates/noirc_frontend/src/hir/type_check/expr.rs index ac49dd01fe3..0f9beed660c 100644 --- a/crates/noirc_frontend/src/hir/type_check/expr.rs +++ b/crates/noirc_frontend/src/hir/type_check/expr.rs @@ -686,8 +686,8 @@ impl<'interner> TypeChecker<'interner> { Ok(Bool) } else { Err(TypeCheckError::TypeMismatchWithSource { - rhs: lhs_type.clone(), - lhs: rhs_type.clone(), + lhs: lhs_type.clone(), + rhs: rhs_type.clone(), span, source: Source::Binary, }) @@ -732,15 +732,15 @@ impl<'interner> TypeChecker<'interner> { if matches!(op.kind, Equal | NotEqual) => { self.unify(x_type, y_type, || TypeCheckError::TypeMismatchWithSource { - rhs: lhs_type.clone(), - lhs: rhs_type.clone(), + lhs: lhs_type.clone(), + rhs: rhs_type.clone(), source: Source::ArrayElements, span: op.location.span, }); self.unify(x_size, y_size, || TypeCheckError::TypeMismatchWithSource { - rhs: lhs_type.clone(), - lhs: rhs_type.clone(), + lhs: lhs_type.clone(), + rhs: rhs_type.clone(), source: Source::ArrayLen, span: op.location.span, }); @@ -752,8 +752,8 @@ impl<'interner> TypeChecker<'interner> { return Ok(Bool); } Err(TypeCheckError::TypeMismatchWithSource { - rhs: lhs.clone(), - lhs: rhs.clone(), + lhs: lhs.clone(), + rhs: rhs.clone(), source: Source::Comparison, span, }) @@ -769,8 +769,8 @@ impl<'interner> TypeChecker<'interner> { Ok(Bool) } (lhs, rhs) => Err(TypeCheckError::TypeMismatchWithSource { - rhs: lhs.clone(), - lhs: rhs.clone(), + lhs: lhs.clone(), + rhs: rhs.clone(), source: Source::Comparison, span, }),