fix(tvix/eval): force value passed to builtins.toString
This introduces a macro to do the forcing, but this solution isn't very nice and also does not work in all cases yet. Change-Id: Icd18862ec47edb82c0efc3af5835a6cb6126f629 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6456 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
0aeca64777
commit
6deaa0d6ce
2 changed files with 26 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ macro_rules! arithmetic_op {
|
|||
$self.push(result);
|
||||
}};
|
||||
|
||||
( $a:ident, $b:ident, $op:tt ) => {{
|
||||
( $a:expr, $b:expr, $op:tt ) => {{
|
||||
match ($a, $b) {
|
||||
(Value::Integer(i1), Value::Integer(i2)) => Ok(Value::Integer(i1 $op i2)),
|
||||
(Value::Float(f1), Value::Float(f2)) => Ok(Value::Float(f1 $op f2)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue