Struct erg_compiler::error::TyCheckError
source · [−]Fields
core: ErrorCore
caused_by: AtomicStr
Implementations
sourceimpl TyCheckError
impl TyCheckError
pub const fn new(core: ErrorCore, caused_by: AtomicStr) -> Self
pub fn dummy(errno: usize) -> 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(
errno: usize,
loc: Location,
name: &str,
caused_by: AtomicStr
) -> Self
pub fn syntax_error<S: Into<AtomicStr>>(
errno: usize,
loc: Location,
caused_by: AtomicStr,
desc: S,
hint: Option<AtomicStr>
) -> Self
pub fn duplicate_decl_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str
) -> Self
pub fn duplicate_definition_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str
) -> Self
pub fn violate_decl_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str,
spec_t: &Type,
found_t: &Type
) -> Self
pub fn no_type_spec_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str
) -> Self
pub fn no_var_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str,
similar_name: Option<&Str>
) -> Self
pub fn no_attr_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
obj_t: &Type,
name: &str,
similar_name: Option<&Str>
) -> Self
pub fn singular_no_attr_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
obj_name: &str,
obj_t: &Type,
name: &str,
similar_name: Option<&Str>
) -> Self
pub fn callable_impl_error<'a, C: Locational + Display>(
errno: usize,
callee: &C,
param_ts: impl Iterator<Item = &'a Type>,
caused_by: AtomicStr
) -> Self
pub fn type_mismatch_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str,
expect: &Type,
found: &Type,
candidates: Option<Set<Type>>,
hint: Option<AtomicStr>
) -> Self
pub fn return_type_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str,
expect: &Type,
found: &Type
) -> Self
pub fn uninitialized_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str,
t: &Type
) -> Self
pub fn argument_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
expect: usize,
found: usize
) -> Self
pub fn match_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
expr_t: &Type
) -> Self
pub fn infer_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
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(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str
) -> Self
pub fn too_many_args_error(
errno: usize,
loc: Location,
callee_name: &str,
caused_by: AtomicStr,
params_len: usize,
pos_args_len: usize,
kw_args_len: usize
) -> Self
pub fn args_missing_error(
errno: usize,
loc: Location,
callee_name: &str,
caused_by: AtomicStr,
missing_len: usize,
missing_params: Vec<Str>
) -> Self
pub fn multiple_args_error(
errno: usize,
loc: Location,
callee_name: &str,
caused_by: AtomicStr,
arg_name: &str
) -> Self
pub fn unexpected_kw_arg_error(
errno: usize,
loc: Location,
callee_name: &str,
caused_by: AtomicStr,
param_name: &str
) -> Self
pub fn unused_warning(
errno: usize,
loc: Location,
name: &str,
caused_by: AtomicStr
) -> Self
pub fn unification_error(
errno: usize,
lhs_t: &Type,
rhs_t: &Type,
lhs_loc: Option<Location>,
rhs_loc: Option<Location>,
caused_by: AtomicStr
) -> Self
pub fn re_unification_error(
errno: usize,
lhs_t: &Type,
rhs_t: &Type,
lhs_loc: Option<Location>,
rhs_loc: Option<Location>,
caused_by: AtomicStr
) -> Self
pub fn subtyping_error(
errno: usize,
sub_t: &Type,
sup_t: &Type,
sub_loc: Option<Location>,
sup_loc: Option<Location>,
caused_by: AtomicStr
) -> Self
pub fn pred_unification_error(
errno: usize,
lhs: &Predicate,
rhs: &Predicate,
caused_by: AtomicStr
) -> Self
pub fn has_effect<S: Into<AtomicStr>>(
errno: usize,
expr: &Expr,
caused_by: S
) -> Self
pub fn move_error<S: Into<AtomicStr>>(
errno: usize,
name: &str,
name_loc: Location,
moved_loc: Location,
caused_by: S
) -> Self
pub fn visibility_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str,
vis: Visibility
) -> Self
pub fn not_const_expr(errno: usize, loc: Location, caused_by: AtomicStr) -> Self
pub fn override_error<S: Into<AtomicStr>>(
errno: usize,
name: &str,
name_loc: Location,
superclass: &Type,
caused_by: S
) -> Self
pub fn inheritance_error(
errno: usize,
class: String,
loc: Location,
caused_by: AtomicStr
) -> Self
pub fn no_candidate_error(
errno: usize,
proj: &Type,
loc: Location,
caused_by: AtomicStr,
hint: Option<AtomicStr>
) -> Self
pub fn method_definition_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
name: &str,
hint: Option<AtomicStr>
) -> Self
pub fn trait_member_type_error(
errno: usize,
loc: Location,
caused_by: AtomicStr,
member_name: &str,
trait_type: &Type,
expect: &Type,
found: &Type,
hint: Option<AtomicStr>
) -> Self
pub fn trait_member_not_defined_error(
errno: usize,
caused_by: AtomicStr,
member_name: &str,
trait_type: &Type,
class_type: &Type,
hint: Option<AtomicStr>
) -> Self
pub fn not_in_trait_error(
errno: usize,
caused_by: AtomicStr,
member_name: &str,
trait_type: &Type,
class_type: &Type,
hint: Option<AtomicStr>
) -> Self
pub fn tyvar_not_defined_error(
errno: usize,
name: &str,
loc: Location,
caused_by: AtomicStr
) -> Self
pub fn file_error(
errno: usize,
desc: String,
loc: Location,
caused_by: AtomicStr
) -> Self
Trait Implementations
sourceimpl Debug for TyCheckError
impl Debug for TyCheckError
sourceimpl From<ParserRunnerError> for TyCheckError
impl From<ParserRunnerError> for TyCheckError
sourcefn from(err: ParserRunnerError) -> Self
fn from(err: ParserRunnerError) -> Self
Converts to this type from the input type.
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>
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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