diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp new file mode 100644 index 000000000..c3bb809c9 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.exp @@ -0,0 +1 @@ +[ false false ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.nix new file mode 100644 index 000000000..7c4333668 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-closure-pointer-compare.nix @@ -0,0 +1,14 @@ +# For an explanation of this behavior see //tvix/docs/value-pointer-equality.md +let + g = x: + owo: "th" + x; +in +[ + ( + { q = g "ia"; } == { q = g ("i"+"a"); } + ) + + ( + [ (g "ia") ] == [ (g ("i"+"a")) ] + ) +]