Fix typo and pluralize message for invalid field arity error.

This commit is contained in:
KtorZ
2023-03-08 11:44:54 +01:00
parent 2aa8a7f973
commit 0ea4538cac

View File

@@ -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"))]