test(tvix/eval): add a test for lazy evaluation of with namespace

Suggested by grfn in cl/6222

Change-Id: I8413af6404786bd43e5cb462a307cc236c4fb9ae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6621
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-09-17 19:05:16 +03:00 committed by tazjin
parent 65dea58ef8
commit 2f91543a42
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1 @@
42

View file

@ -0,0 +1,6 @@
# The 'namespace' of a with should only be evaluated if an identifier
# from it is actually accessed.
with (builtins.throw "should not occur");
42