test(tvix/eval): add tests for internal formals dependencies

Formals can depend on each other when using another formal as a
default value.

This test ensures that the compiler's declaration and initialisation
order of formals is consistent with what actually happens in the VM.

Change-Id: Ibdabe262554e8066d67fac1ebc3b5a48ef626e18
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7948
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Vincent Ambo 2023-01-29 18:49:06 +03:00 committed by tazjin
parent 4b3ccd205a
commit 7702941dd9
4 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# Tests formals which have internal default values that must be deferred.
({ optional ? defaultValue, defaultValue }: optional) { defaultValue = 42; }

View file

@ -0,0 +1 @@
42

View file

@ -0,0 +1,3 @@
# Tests formals which have internal default values.
({ defaultValue, optional ? defaultValue }: optional) { defaultValue = 42; }