From b2d62bff3b7958b3ed62c285a7ebd45045ac2e05 Mon Sep 17 00:00:00 2001 From: jfecher Date: Fri, 22 Sep 2023 18:32:17 -0500 Subject: [PATCH] fix: Error message for assigning the wrong type is backwards #2804 (#2805) --- compiler/noirc_frontend/src/hir/type_check/stmt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/noirc_frontend/src/hir/type_check/stmt.rs b/compiler/noirc_frontend/src/hir/type_check/stmt.rs index 5db23c3f4f2..11f106dab10 100644 --- a/compiler/noirc_frontend/src/hir/type_check/stmt.rs +++ b/compiler/noirc_frontend/src/hir/type_check/stmt.rs @@ -115,8 +115,8 @@ impl<'interner> TypeChecker<'interner> { let span = self.interner.expr_span(&assign_stmt.expression); self.unify_with_coercions(&expr_type, &lvalue_type, assign_stmt.expression, || { TypeCheckError::TypeMismatchWithSource { - actual: lvalue_type.clone(), - expected: expr_type.clone(), + actual: expr_type.clone(), + expected: lvalue_type.clone(), span, source: Source::Assignment, }