From 144ef44b8c60df62cdf0269eb26adee1f05ad167 Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu Date: Fri, 13 Oct 2023 16:10:56 -0400 Subject: [PATCH] Update errors --- errors/src/errors/loop_unroller/loop_unroller_errors.rs | 7 +++++++ errors/src/errors/type_checker/type_checker_error.rs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/errors/src/errors/loop_unroller/loop_unroller_errors.rs b/errors/src/errors/loop_unroller/loop_unroller_errors.rs index fde5c4c8b1..66b6900e26 100644 --- a/errors/src/errors/loop_unroller/loop_unroller_errors.rs +++ b/errors/src/errors/loop_unroller/loop_unroller_errors.rs @@ -29,4 +29,11 @@ create_messages!( msg: format!("The loop range must be increasing."), help: None, } + + @formatted + variable_array_access { + args: (), + msg: format!("The array index must be constant."), + help: None, + } ); diff --git a/errors/src/errors/type_checker/type_checker_error.rs b/errors/src/errors/type_checker/type_checker_error.rs index c66e4338bd..8caa7bdb74 100644 --- a/errors/src/errors/type_checker/type_checker_error.rs +++ b/errors/src/errors/type_checker/type_checker_error.rs @@ -705,4 +705,11 @@ create_messages!( msg: format!("An array cannot have a tuple as an element type"), help: None, } + + @formatted + array_element_cannot_be_record { + args: (), + msg: format!("An array cannot have a record as an element type"), + help: None, + } );