diff options
author | sterni <sternenseemann@systemli.org> | 2023-06-07T14·08+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-06-15T11·01+0000 |
commit | 0f71d8f813adad2d8bf4cc3048adb7fb60f5a1f8 (patch) | |
tree | 45a391afc1c5d775ab5a36d04dc82bf3184e211d /tvix/eval/src/tests/tvix_tests/notyetpassing/eval-fail-builtins-genericClosure-uncomparable-keys2.nix | |
parent | 0005737f110aa7667aec3ca3bb5bc7d4907a8664 (diff) |
test(tvix/eval): genericClosure (pointer) comparison support r/6309
genericClosure has very limited support for pointer equality: It relies on comparison (not equality!) in C++ Nix, so as soon as C++ Nix supports comparing lists (langVersion >= 6) we can rely on pointer equality for key. Since Tvix uses equality, not comparison for the insert, our behavior is currently different, as documented by the notyetpassing tests. Change-Id: Ifcd741ed4fc3ccc3825f7038875d56a9918b786a Reviewed-on: https://cl.tvl.fyi/c/depot/+/8720 Tested-by: BuildkiteCI Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/notyetpassing/eval-fail-builtins-genericClosure-uncomparable-keys2.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/notyetpassing/eval-fail-builtins-genericClosure-uncomparable-keys2.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-fail-builtins-genericClosure-uncomparable-keys2.nix b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-fail-builtins-genericClosure-uncomparable-keys2.nix new file mode 100644 index 000000000000..ca2825524546 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-fail-builtins-genericClosure-uncomparable-keys2.nix @@ -0,0 +1,12 @@ +let + id = x: x; +in + +builtins.genericClosure { + startSet = [ { key = id; first = true; } ]; + operator = + { first, ... }: + if first then [ + { key = id; first = false; } + ] else []; +} |