From 786e12a7382eaaa957389b3a9e9e962efe7e8403 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 29 Aug 2022 18:40:52 +0300 Subject: feat(tvix/eval): always emit OpForce as the last instruction Change-Id: Id70c987f654dc5d9b47db74e395281309762b468 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6353 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.exp | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.nix | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.nix (limited to 'tvix/eval/src/tests') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.exp new file mode 100644 index 0000000000..d81cc0710e --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.exp @@ -0,0 +1 @@ +42 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.nix new file mode 100644 index 0000000000..133929dd19 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-thunks.nix @@ -0,0 +1,7 @@ +# If a thunk yields another thunk, OpForce should keep forcing until +# there is a value. +let + a = b; + b = c; + c = 42; +in a -- cgit 1.4.1