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:
parent
d5b989ddc0
commit
1125b6b7b7
2 changed files with 21 additions and 0 deletions
|
@ -0,0 +1 @@
|
||||||
|
[ true true true true true true true true false false true ]
|
|
@ -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)
|
||||||
|
]
|
Loading…
Reference in a new issue