From 5ee89bcf5ca3f0b0d3b809b01ac04bf38f51d7e4 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 2 Sep 2022 01:19:53 +0300 Subject: fix(tvix/eval): inherit scope poisoning data in nested contexts Scope poisoning must be inherited across lambda context boundaries, e.g. if an outer scope has a poisoned `null`, any lambdas defined on the same level must reference that poisoned identifier correctly. Change-Id: I1aac64e1c048a6f3bacadb6d78ed295fa439e8b4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6410 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/eval-okay-nested-poisoning.nix | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-nested-poisoning.nix (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-nested-poisoning.nix') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-poisoning.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-poisoning.nix new file mode 100644 index 0000000000..8d0280bb89 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-poisoning.nix @@ -0,0 +1,4 @@ +let + null = 1; + f = n: n + null; +in f 41 -- cgit 1.4.1