test(tvix/eval): add test for mutually recursive let bindings
This test shows that let bindings' dependencies can form a cyclical graph, so we need to use thunking to break this cycle. Change-Id: I2a4de71fd7024f3d3d1166154784139a82f39411 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6495 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
240d90aa8a
commit
bb1adbb05b
2 changed files with 15 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
{ a = 1; b = 2; c = 3; }
|
|
@ -0,0 +1,14 @@
|
|||
let
|
||||
a = {
|
||||
a = 3;
|
||||
b = b.b;
|
||||
};
|
||||
|
||||
b = {
|
||||
a = a.a - 2;
|
||||
b = 2;
|
||||
c = a.c or 3;
|
||||
};
|
||||
in
|
||||
|
||||
a // b
|
Loading…
Reference in a new issue