diff --git a/crates/aiken-lang/src/tipo/error.rs b/crates/aiken-lang/src/tipo/error.rs index 6d6d418f..e9adbe94 100644 --- a/crates/aiken-lang/src/tipo/error.rs +++ b/crates/aiken-lang/src/tipo/error.rs @@ -264,8 +264,9 @@ You can use '{discard}' and numbers to distinguish between similar names. }, #[error( - "I saw a {} fields in a context where there should be {}.\n", + "I saw {} field{} in a context where there should be {}.\n", given.if_supports_color(Stdout, |s| s.purple()), + if *given <= 1 { "" } else { "s"}, expected.if_supports_color(Stdout, |s| s.purple()), )] #[diagnostic(url("https://aiken-lang.org/language-tour/custom-types"))]