From b8213b39c5568649ddba8a0d2970411aa2fded7a Mon Sep 17 00:00:00 2001 From: Jake Fecher Date: Fri, 22 Sep 2023 16:03:28 -0500 Subject: [PATCH] Fix backwards assignment type error --- 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, }