From 68aad6d4cf5c653154396356366f09dacea73495 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 28 Aug 2022 17:57:52 +0300 Subject: feat(tvix/eval): emit OpFinalise when local scopes are complete With this change, the runtime can correctly capture deferred upvalues. Change-Id: I1e43b7b1ac2553b1812424adfc8bd08ef77bf1ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/6339 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.exp | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.nix | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.nix (limited to 'tvix/eval/src/tests') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.exp new file mode 100644 index 000000000000..d81cc0710eb6 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.exp @@ -0,0 +1 @@ +42 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.nix new file mode 100644 index 000000000000..dae170b06bad --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-late-binding-closure.nix @@ -0,0 +1,4 @@ +let + f = n: n + a; + a = 2; +in f 40 -- cgit 1.4.1