From 7702941dd9f561cb1f90ada28aa7401ea54a86db Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 29 Jan 2023 18:49:06 +0300 Subject: 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 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.nix | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.nix (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.nix') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.nix new file mode 100644 index 0000000000..5c6702120f --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.nix @@ -0,0 +1,3 @@ +# Tests formals which have internal default values that must be deferred. + +({ optional ? defaultValue, defaultValue }: optional) { defaultValue = 42; } -- cgit 1.4.1