Implement coercion of numeric types for ascription and arithmetic (off by default) (#6175)

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-04-07 16:13:15 +12:00
committed by GitHub
parent ce7a967f5f
commit e7b23e1638
72 changed files with 2789 additions and 1604 deletions

View File

@ -13,7 +13,7 @@ pub async fn int(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, Kc
let num = args.get_number_with_type()?;
let converted = inner_int(num.n)?;
Ok(args.make_user_val_from_f64_with_type(num.map(converted)))
Ok(args.make_user_val_from_f64_with_type(num.map_value(converted)))
}
/// Convert a number to an integer.