test(tvix/eval): check inner forcing despite declaring pointer

Maybe counter-intuitively the inner elements of a list or the
attribute values of an attribute set will be forced despite
pointer equality (but only one layer deep).

Change-Id: I485d96452fb56f5fb342d39039c9137725b33d3f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7371
Reviewed-by: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
This commit is contained in:
sterni 2022-11-23 20:57:08 +01:00
parent 5ab86ab8dc
commit 90fe9a51d7
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,5 @@
let
x = throw "I have been forced";
in
x == x

View file

@ -0,0 +1,7 @@
# For an explanation of this behavior see //tvix/docs/value-pointer-equality.md
let
x = { foo = throw "foo"; };
in
# while `builtins.seq x null` would succeed, this fails!
x == x