diff options
Diffstat (limited to 'tvix/eval/src')
4 files changed, 8 insertions, 0 deletions
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 000000000000..d81cc0710eb6 --- /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 000000000000..5c6702120fc4 --- /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 000000000000..d81cc0710eb6 --- /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 000000000000..c6dd5e9d54cf --- /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; } |