Struct erg_compiler::error::TyCheckError
source · [−]Fields
core: ErrorCore
caused_by: Str
Implementations
sourceimpl TyCheckError
impl TyCheckError
pub const fn new(core: ErrorCore, caused_by: Str) -> Self
pub fn unreachable(fn_name: &str, line: u32) -> Self
pub fn checker_bug(errno: usize, loc: Location, fn_name: &str, line: u32) -> Self
pub fn feature_error(loc: Location, name: &str, caused_by: Str) -> Self
pub fn syntax_error<S: Into<Str>>(
errno: usize,
loc: Location,
caused_by: Str,
desc: S,
hint: Option<Str>
) -> Self
pub fn duplicate_decl_error(loc: Location, caused_by: Str, name: &str) -> Self
pub fn violate_decl_error(
loc: Location,
caused_by: Str,
name: &str,
spec_t: &Type,
found_t: &Type
) -> Self
pub fn no_type_spec_error(loc: Location, caused_by: Str, name: &str) -> Self
pub fn no_var_error(
loc: Location,
caused_by: Str,
name: &str,
similar_name: Option<&Str>
) -> Self
pub fn no_attr_error(
loc: Location,
caused_by: Str,
obj_t: &Type,
name: &str,
similar_name: Option<&Str>
) -> Self
pub fn callable_impl_error<'a, C: Locational + Display>(
callee: &C,
param_ts: impl Iterator<Item = &'a Type>,
caused_by: Str
) -> Self
pub fn type_mismatch_error(
loc: Location,
caused_by: Str,
name: &str,
expect: &Type,
found: &Type
) -> Self
pub fn return_type_error(
loc: Location,
caused_by: Str,
name: &str,
expect: &Type,
found: &Type
) -> Self
pub fn uninitialized_error(
loc: Location,
caused_by: Str,
name: &str,
t: &Type
) -> Self
pub fn argument_error(
loc: Location,
caused_by: Str,
expect: usize,
found: usize
) -> Self
pub fn match_error(loc: Location, caused_by: Str, expr_t: &Type) -> Self
pub fn infer_error(loc: Location, caused_by: Str, expr: &str) -> Self
pub fn dummy_infer_error(fn_name: &str, line: u32) -> Self
pub fn not_relation(fn_name: &str, line: u32) -> Self
pub fn reassign_error(loc: Location, caused_by: Str, name: &str) -> Self
pub fn too_many_args_error(
loc: Location,
callee_name: &str,
caused_by: Str,
params_len: usize,
pos_args_len: usize,
kw_args_len: usize
) -> Self
pub fn multiple_args_error(
loc: Location,
callee_name: &str,
caused_by: Str,
arg_name: &str
) -> Self
pub fn unexpected_kw_arg_error(
loc: Location,
callee_name: &str,
caused_by: Str,
param_name: &str
) -> Self
pub fn unused_warning(loc: Location, name: &str, caused_by: Str) -> Self
pub fn unification_error(
lhs_t: &Type,
rhs_t: &Type,
lhs_loc: Option<Location>,
rhs_loc: Option<Location>,
caused_by: Str
) -> Self
pub fn re_unification_error(
lhs_t: &Type,
rhs_t: &Type,
lhs_loc: Option<Location>,
rhs_loc: Option<Location>,
caused_by: Str
) -> Self
pub fn subtyping_error(
sub_t: &Type,
sup_t: &Type,
sub_loc: Option<Location>,
sup_loc: Option<Location>,
caused_by: Str
) -> Self
pub fn pred_unification_error(
lhs: &Predicate,
rhs: &Predicate,
caused_by: Str
) -> Self
pub fn has_effect<S: Into<Str>>(expr: &Expr, caused_by: S) -> Self
pub fn move_error<S: Into<Str>>(
name: &str,
name_loc: Location,
moved_loc: Location,
caused_by: S
) -> Self
Trait Implementations
sourceimpl Debug for TyCheckError
impl Debug for TyCheckError
sourceimpl From<TyCheckError> for TyCheckErrors
impl From<TyCheckError> for TyCheckErrors
sourcefn from(err: TyCheckError) -> Self
fn from(err: TyCheckError) -> Self
Converts to this type from the input type.
sourceimpl Stream<TyCheckError> for TyCheckErrors
impl Stream<TyCheckError> for TyCheckErrors
fn payload(self) -> Vec<TyCheckError>
fn ref_payload(&self) -> &Vec<TyCheckError>
fn ref_mut_payload(&mut self) -> &mut Vec<TyCheckError>
fn clear(&mut self)
fn len(&self) -> usize
fn size(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, idx: usize, elem: T)
fn remove(&mut self, idx: usize) -> T
fn push(&mut self, elem: T)
fn append<S>(&mut self, s: &mut S) where
S: Stream<T>,
fn pop(&mut self) -> Option<T>
fn lpop(&mut self) -> Option<T>
fn get(&self, idx: usize) -> Option<&T>
fn get_mut(&mut self, idx: usize) -> Option<&mut T>
fn first(&self) -> Option<&T>
fn first_mut(&mut self) -> Option<&mut T>
fn last(&self) -> Option<&T>
fn last_mut(&mut self) -> Option<&mut T>
fn iter(&self) -> Iter<'_, T>
fn iter_mut(&mut self) -> IterMut<'_, T>
fn into_iter(self) -> IntoIter<T, Global>
fn take_all(&mut self) -> Vec<T, Global>
Auto Trait Implementations
impl RefUnwindSafe for TyCheckError
impl !Send for TyCheckError
impl !Sync for TyCheckError
impl Unpin for TyCheckError
impl UnwindSafe for TyCheckError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more