1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Print value on type error

Adds the failing value to `value is <TYPE> while a <TYPE> is expected`
error messages.
This commit is contained in:
Rebecca Turner 2023-12-06 16:03:01 -08:00
parent b74ec56da9
commit cb7fbd4d83
No known key found for this signature in database
19 changed files with 227 additions and 136 deletions

View file

@ -997,7 +997,7 @@ static void prim_trace(EvalState & state, const PosIdx pos, Value * * args, Valu
if (args[0]->type() == nString)
printError("trace: %1%", args[0]->string_view());
else
printError("trace: %1%", printValue(state, *args[0]));
printError("trace: %1%", ValuePrinter(state, *args[0]));
state.forceValue(*args[1], pos);
v = *args[1];
}