1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 04:21:16 +02:00

Origin: Use SourcePath

This commit is contained in:
Eelco Dolstra 2023-04-06 15:25:06 +02:00
parent 94812cca98
commit a9759407e5
9 changed files with 22 additions and 23 deletions

View file

@ -594,8 +594,8 @@ bool NixRepl::processLine(std::string line)
return {path, 0};
} else if (v.isLambda()) {
auto pos = state->positions[v.lambda.fun->pos];
if (auto path = std::get_if<Path>(&pos.origin))
return {SourcePath(CanonPath(*path)), pos.line};
if (auto path = std::get_if<SourcePath>(&pos.origin))
return {*path, pos.line};
else
throw Error("'%s' cannot be shown in an editor", pos);
} else {