mirror of
https://github.com/NixOS/nix.git
synced 2025-11-10 12:36:01 +01:00
libexpr: Add and use lambda getter
This commit is contained in:
parent
371fcf91c3
commit
6587e7bcff
11 changed files with 36 additions and 33 deletions
|
|
@ -484,7 +484,7 @@ ProcessLineResult NixRepl::processLine(std::string line)
|
|||
auto path = state->coerceToPath(noPos, v, context, "while evaluating the filename to edit");
|
||||
return {path, 0};
|
||||
} else if (v.isLambda()) {
|
||||
auto pos = state->positions[v.payload.lambda.fun->pos];
|
||||
auto pos = state->positions[v.lambda().fun->pos];
|
||||
if (auto path = std::get_if<SourcePath>(&pos.origin))
|
||||
return {*path, pos.line};
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue