about summary refs log blame commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-nested-let-slots.nix
blob: 811bb4361bf7ca90ce502c0a2369d67e510d35d5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                  
# This test deals with a tricky edge-case around scopes, where the
# stack slot accounting must correctly account for the position at
# which the body of a let expression is being initialised when
# resolving upvalues.

let
  a = 1;
  b = 2;
  outer = let
    c = 3;
    d = 4;
    inner = let
      e = 5;
      f = 6;
    in g: [ a b c d e f g ];
  in inner;
in outer 7