Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions compiler/noirc_evaluator/src/ssa/ir/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ impl Type {
Type::Numeric(NumericType::NativeField)
}

/// Returns whether the `Type` represents a [native field numeric type][NumericType::NativeField].
pub fn is_field(&self) -> bool {
matches!(self, Type::Numeric(NumericType::NativeField))
}

/// Creates the type of an array's length.
pub fn length_type() -> Type {
Type::unsigned(SSA_WORD_SIZE)
Expand Down
Loading
Loading