diff options
Diffstat (limited to 'tvix/eval/src/tests')
4 files changed, 20 insertions, 2 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit-from-later-bound.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit-from-later-bound.exp new file mode 100644 index 000000000000..409940768f2a --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit-from-later-bound.exp @@ -0,0 +1 @@ +23 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit-from-later-bound.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit-from-later-bound.nix new file mode 100644 index 000000000000..21196f48bcbe --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit-from-later-bound.nix @@ -0,0 +1,13 @@ +let + inherit (c) d; + inherit (a) b c; + + a = { + b = 20; + c = { + d = 3; + }; + }; +in + +b + d diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.exp index d00491fd7e5b..0cfbf08886fc 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.exp +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.exp @@ -1 +1 @@ -1 +2 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.nix index 12eed10e13fc..4ec270e3bf43 100644 --- a/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.nix +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-let-inherit.nix @@ -4,5 +4,9 @@ let }; in let + set2 = { + b = 1; + }; inherit (set) a; - in a + inherit (set2) b; + in a + b |