TypeCheck

Trait TypeCheck 

Source
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§

Source

fn type_check( &self, ctx: &impl GetNode<Expr, ExprRef>, ) -> Result<Type, TypeCheckError>

Type check expression node. Does not recurse to lower nodes.

Source

fn get_type(&self, ctx: &impl GetNode<Expr, ExprRef>) -> Type

gets type as fast as possible without performing any checks

Provided Methods§

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.

Implementors§