Files
lix/tests/functional2/repl_characterization/stacktrace/relative.md
T
rootile 64b434b87b tests(f2/repl): migrate stacktrace tests
Change-Id: Ic6795f22d68aea113fa2037cbd0a731ac5e698f8
2026-06-11 16:30:56 +02:00

1.6 KiB

args
args
--debugger
let f = _: throw "x_x"; x = f 5; in x
error: x_x

Added 3 variables.

absolute indices still work:

:st 1

1: while calling a function
«string»:1:12

     1| let f = _: throw "x_x"; x = f 5; in x
      |            ^

Env level 0
static: _ 

Env level 1
static: f x 

Env level 2
static: 

Env level 3
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true 

Added 3 variables.

index with + goes up the stack relative to current (1 in this case):

:st +3

4: while evaluating a 'let' expression
«string»:1:1

     1| let f = _: throw "x_x"; x = f 5; in x
      | ^

Env level 0
static: f x 

Env level 1
static: 

Env level 2
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true 

Added 2 variables.

index with - goes down and is also relative to current(4):

:st -1

3: while calling a function
«string»:1:29

     1| let f = _: throw "x_x"; x = f 5; in x
      |                             ^

Env level 0
static: f x 

Env level 1
static: 

Env level 2
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true 

Added 2 variables.

quit

:quit
error: x_x