From f6bcd11cad1e370deb0580ae1a7f4d050cd75bab Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 8 Oct 2022 14:48:48 -0400 Subject: fix(tvix/eval): Force thunks when comparing against ground vals Thunks correctly force when comparing for equality against other thunks, but weren't being forced correctly when comparing against non-thunk values, in either direction. Change-Id: Ia03702895ec4d70aed3445c1b0a9a7a641d1a300 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6897 Autosubmit: grfn Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/eval-okay-lazy-equality.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-lazy-equality.nix') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-equality.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-equality.nix index b0ec8593a4..d19d1213d6 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-equality.nix +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-lazy-equality.nix @@ -4,8 +4,12 @@ let list1 = [ (1 + 2) ]; list2 = [ (2 + 1) ]; list3 = [ (2 + 2) ]; + list4 = [ (2 + 2) ]; + list5 = [ (2 + 2) ]; in [ (attrs1 == attrs2) (list1 == list2) (list3 == list2) + (list4 == [ 4 ]) + ([ 4 ] == list5) ] -- cgit 1.4.1