test(tvix/eval): add test case for builtins set pointer equality

Unsupported by Tvix at the moment. Documents b/280.

Change-Id: I48844feeefa9da8ed7e5d85300d52bb5650f82d2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8772
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
This commit is contained in:
sterni 2023-06-14 15:19:42 +02:00
parent d5b989ddc0
commit 1125b6b7b7
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1 @@
[ true true true true true true true true false false true ]

View file

@ -0,0 +1,20 @@
let
alias = builtins;
in
[
(builtins == builtins)
(alias == builtins)
(builtins == builtins.builtins)
(builtins.builtins == builtins.builtins)
(builtins.builtins == builtins.builtins.builtins)
(alias == alias)
(alias == builtins.builtins)
([ builtins ] == [ builtins ])
# Surprisingly this only works with the set
([ builtins.add ] == [ builtins.add ])
({ inherit (builtins) import; } == { inherit (builtins) import; })
# But this does
(let x = { inherit (builtins) add; }; in x == x)
]