1
1
Fork 0
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:
Sergei Zimmerman 2025-06-12 19:42:50 +00:00
parent 371fcf91c3
commit 6587e7bcff
No known key found for this signature in database
GPG key ID: A9B0B557CA632325
11 changed files with 36 additions and 33 deletions

View file

@ -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