diff --git a/crates/fayalite/src/int.rs b/crates/fayalite/src/int.rs index 4f31480..d6f4cfa 100644 --- a/crates/fayalite/src/int.rs +++ b/crates/fayalite/src/int.rs @@ -887,6 +887,15 @@ pub trait IntTypeTrait: CanonicalType = DynSIntType, CanonicalValue = DynSInt, >; + fn literal(self, value: impl Into) -> Expr> + where + Self: IntTypeTrait< + CanonicalType = DynIntType<::Signed>, + CanonicalValue = DynInt<::Signed>, + >, + { + IntValue::with_type(self, value).to_expr() + } fn from_width_unchecked(width: usize) -> Self; fn width(self) -> usize; fn as_same_width_uint(self) -> Self::SameWidthUInt;