diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.exp new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals-deferred.exp @@ -0,0 +1 @@ +42 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 000000000..5c6702120 --- /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; } diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals.exp new file mode 100644 index 000000000..d81cc0710 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals.exp @@ -0,0 +1 @@ +42 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals.nix new file mode 100644 index 000000000..c6dd5e9d5 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-internal-formals.nix @@ -0,0 +1,3 @@ +# Tests formals which have internal default values. + +({ defaultValue, optional ? defaultValue }: optional) { defaultValue = 42; }