Fix to use correct units for array range expressions (#6837)

* Fix to use correct units for array range expressions

* Update output
This commit is contained in:
Jonathan Tran
2025-05-12 01:30:33 -04:00
committed by GitHub
parent 1240b23080
commit 1a325d0b29
26 changed files with 8766 additions and 2322 deletions

View File

@ -404,6 +404,13 @@ impl KclValue {
}
}
pub fn as_int_with_ty(&self) -> Option<(i64, NumericType)> {
match self {
KclValue::Number { value, ty, .. } => crate::try_f64_to_i64(*value).map(|i| (i, ty.clone())),
_ => None,
}
}
pub fn as_object(&self) -> Option<&KclObjectFields> {
if let KclValue::Object { value, meta: _ } = &self {
Some(value)