Skip to content

Commit

Permalink
BoundedInt builtin translates as felt
Browse files Browse the repository at this point in the history
  • Loading branch information
piniom committed Dec 14, 2024
1 parent 139f7c8 commit dfaba4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/parser/src/tokens/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ pub const CAIRO_CORE_BASIC: [&str; 17] = [
// to match array pattern.
pub const CAIRO_CORE_SPAN_ARRAY: [&str; 2] = ["core::array::Span", "core::array::Array"];

pub const CAIRO_GENERIC_BUILTINS: [&str; 3] = [
pub const CAIRO_GENERIC_BUILTINS: [&str; 4] = [
"core::option::Option",
"core::result::Result",
"core::zeroable::NonZero",
"core::internal::bounded_int::BoundedInt"
];

pub const CAIRO_COMPOSITE_BUILTINS: [&str; 3] = [
Expand Down
1 change: 1 addition & 0 deletions crates/rs/src/expand/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ fn builtin_composite_to_rust(type_name: &str) -> (String, bool) {
"ByteArray" => (format!("{ccsp}::ByteArray"), true),
"NonZero" => (format!("{ccsp}::NonZero"), true),
"U256" => (format!("{ccsp}::U256"), true),
"BoundedInt" => ("starknet::core::types::Felt".to_string(), true),
_ => (type_name.to_string(), false),
}
}

0 comments on commit dfaba4b

Please sign in to comment.