Skip to main content
Version: dev

TypedExpr

std::meta::typed_expr contains methods on the built-in TypedExpr type for resolved and type-checked expressions.

Methods

get_type

as_function_definition
pub comptime fn as_function_definition(self) -> Option<FunctionDefinition> {}

Source code: noir_stdlib/src/meta/typed_expr.nr#L7-L9

If this expression refers to a function definitions, returns it. Otherwise returns Option::none().

get_type

get_type
pub comptime fn get_type(self) -> Option<Type> {}

Source code: noir_stdlib/src/meta/typed_expr.nr#L13-L15

Returns the type of the expression, or Option::none() if there were errors when the expression was previously resolved.