update errors

This commit is contained in:
Sofia 2025-07-13 13:58:12 +03:00
parent e79a0fe458
commit 29e78cf1aa

View File

@ -18,8 +18,6 @@ pub enum ErrorKind {
Null, Null,
#[error("Type is vague: {0}")] #[error("Type is vague: {0}")]
TypeIsVague(VagueType), TypeIsVague(VagueType),
#[error("Can not coerce {0} to vague type {1}")]
HintIsVague(TypeKind, VagueType),
#[error("Literal {0} can not be coerced to type {1}")] #[error("Literal {0} can not be coerced to type {1}")]
LiteralIncompatible(Literal, TypeKind), LiteralIncompatible(Literal, TypeKind),
#[error("Types {0} and {1} are incompatible")] #[error("Types {0} and {1} are incompatible")]
@ -28,7 +26,7 @@ pub enum ErrorKind {
VariableNotDefined(String), VariableNotDefined(String),
#[error("Function not defined: {0}")] #[error("Function not defined: {0}")]
FunctionNotDefined(String), FunctionNotDefined(String),
#[error("Type is vague: {0}")] #[error("Expected a return type of {0}, got {1} instead")]
ReturnTypeMismatch(TypeKind, TypeKind), ReturnTypeMismatch(TypeKind, TypeKind),
#[error("Function not defined: {0}")] #[error("Function not defined: {0}")]
FunctionAlreadyDefined(String), FunctionAlreadyDefined(String),