pub trait TypeCheck {
// Required methods
fn type_check(
&self,
ctx: &impl GetNode<Expr, ExprRef>,
) -> Result<Type, TypeCheckError>;
fn get_type(&self, ctx: &impl GetNode<Expr, ExprRef>) -> Type;
// Provided methods
fn get_bv_type(&self, ctx: &impl GetNode<Expr, ExprRef>) -> Option<WidthInt> { ... }
fn get_array_type(
&self,
ctx: &impl GetNode<Expr, ExprRef>,
) -> Option<ArrayType> { ... }
}Required Methods§
Sourcefn type_check(
&self,
ctx: &impl GetNode<Expr, ExprRef>,
) -> Result<Type, TypeCheckError>
fn type_check( &self, ctx: &impl GetNode<Expr, ExprRef>, ) -> Result<Type, TypeCheckError>
Type check expression node. Does not recurse to lower nodes.
Provided Methods§
fn get_bv_type(&self, ctx: &impl GetNode<Expr, ExprRef>) -> Option<WidthInt>
fn get_array_type(&self, ctx: &impl GetNode<Expr, ExprRef>) -> Option<ArrayType>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.