fix(tvix/eval): correctly thunk deferred formals access
Formals can be initialised with deferred default values (see the test cases), in which case they need an extra thunk to have something that can be finalised appropriately when the setup is done. Fixes: b/255 Change-Id: I380e3770be68eaa83ace96d450c7cead32dacc9f Reviewed-on: https://cl.tvl.fyi/c/depot/+/8196 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
parent
43d04d9b98
commit
eef48b8f1f
3 changed files with 18 additions and 1 deletions
|
|
@ -0,0 +1 @@
|
|||
[ false -2 ]
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Application of unary operators on deferred formals arguments (via
|
||||
# defaulting), see also b/255.
|
||||
[
|
||||
(({ b ? !a, a }: b) { a = true; })
|
||||
(({ b ? -a, a }: b) { a = 2; })
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue