diff options
author | William Carroll <wpcarro@gmail.com> | 2022-09-06T05·16-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-09-15T21·41+0000 |
commit | f5f6bd319db3b224aa603d5eaa74e1d61f071f50 (patch) | |
tree | a0448624c57b7321bee77be99fa62929bbb0b2c2 /tvix/eval/src/value/mod.rs | |
parent | 5a6d9ee1a01f47a139279de1596d77163a80e776 (diff) |
feat(tvix/eval): Support builtins.bitAnd r/4867
Bitwise `and` on integers. Change-Id: I9f2a9182a057af26906683acd97a40dfabbdded8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6548 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/value/mod.rs')
-rw-r--r-- | tvix/eval/src/value/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs index 47096dd40912..dc6202dab547 100644 --- a/tvix/eval/src/value/mod.rs +++ b/tvix/eval/src/value/mod.rs @@ -246,6 +246,7 @@ impl Value { } gen_cast!(as_bool, bool, "bool", Value::Bool(b), *b); + gen_cast!(as_int, i64, "int", Value::Integer(x), *x); gen_cast!(to_str, NixString, "string", Value::String(s), s.clone()); gen_cast!(to_attrs, Rc<NixAttrs>, "set", Value::Attrs(a), a.clone()); gen_cast!(to_list, NixList, "list", Value::List(l), l.clone()); |