diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-let-useful-plain-inherit-mixed.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-let-useful-plain-inherit-mixed.nix | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-let-useful-plain-inherit-mixed.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-let-useful-plain-inherit-mixed.nix new file mode 100644 index 000000000000..30981099cbde --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-let-useful-plain-inherit-mixed.nix @@ -0,0 +1,20 @@ +# This test mixes different ways of creating bindings in a let … in expression +# to make sure that the compiler initialises the locals in the same order as +# they are declared. + +let + d = 4; +in + +# Trick to allow useless inherits in the following let +with { _unused = null; }; + +let + set = { b = 2; }; + a = 1; + inherit (set) b; + c = 3; + inherit d; +in + +[ a b c d ] |