Enum ezno_checker::types::calling::FunctionCallingError
source · pub enum FunctionCallingError {
Show 13 variants
InvalidArgumentType {
parameter_type: TypeStringRepresentation,
argument_type: TypeStringRepresentation,
argument_position: SpanWithSource,
parameter_position: SpanWithSource,
restriction: Option<(SpanWithSource, TypeStringRepresentation)>,
},
MissingArgument {
parameter_position: SpanWithSource,
call_site: SpanWithSource,
},
ExcessArguments {
count: usize,
position: SpanWithSource,
},
NotCallable {
calling: TypeStringRepresentation,
call_site: SpanWithSource,
},
ReferenceRestrictionDoesNotMatch {
reference: RootReference,
requirement: TypeStringRepresentation,
found: TypeStringRepresentation,
},
CyclicRecursion(FunctionId, SpanWithSource),
NoLogicForIdentifier(String, SpanWithSource),
NeedsToBeCalledWithNewKeyword(SpanWithSource),
TDZ {
error: TDZ,
call_site: SpanWithSource,
},
SetPropertyConstraint {
property_type: TypeStringRepresentation,
value_type: TypeStringRepresentation,
assignment_position: SpanWithSource,
call_site: SpanWithSource,
},
UnconditionalThrow {
value: TypeStringRepresentation,
call_site: SpanWithSource,
},
MismatchedThis {
expected: TypeStringRepresentation,
found: TypeStringRepresentation,
call_site: SpanWithSource,
},
CannotCatch {
catch: TypeStringRepresentation,
thrown: TypeStringRepresentation,
thrown_position: SpanWithSource,
},
}
Expand description
Errors from trying to call a function
Variants§
InvalidArgumentType
Fields
§
parameter_type: TypeStringRepresentation
§
argument_type: TypeStringRepresentation
§
argument_position: SpanWithSource
§
parameter_position: SpanWithSource
§
restriction: Option<(SpanWithSource, TypeStringRepresentation)>
MissingArgument
ExcessArguments
NotCallable
ReferenceRestrictionDoesNotMatch
Fields
§
reference: RootReference
§
requirement: TypeStringRepresentation
§
found: TypeStringRepresentation
CyclicRecursion(FunctionId, SpanWithSource)
NoLogicForIdentifier(String, SpanWithSource)
NeedsToBeCalledWithNewKeyword(SpanWithSource)
TDZ
SetPropertyConstraint
Fields
§
property_type: TypeStringRepresentation
§
value_type: TypeStringRepresentation
§
assignment_position: SpanWithSource
§
call_site: SpanWithSource
Should be set
UnconditionalThrow
TODO WIP
MismatchedThis
CannotCatch
Fields
§
catch: TypeStringRepresentation
§
thrown: TypeStringRepresentation
§
thrown_position: SpanWithSource
Auto Trait Implementations§
impl Freeze for FunctionCallingError
impl RefUnwindSafe for FunctionCallingError
impl Send for FunctionCallingError
impl Sync for FunctionCallingError
impl Unpin for FunctionCallingError
impl UnwindSafe for FunctionCallingError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more