1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

assert: Report why values aren't equal

This commit is contained in:
Robert Hensing 2024-07-05 16:43:48 +02:00
parent 509be0e77a
commit d63bd8295e
29 changed files with 532 additions and 5 deletions

View file

@ -20,9 +20,11 @@ error:
| ^
3|
error: assertion '(arg == "y")' failed
at /pwd/lang/eval-fail-assert.nix:2:12:
… while evaluating the condition of the assertion '(arg == "y")'
at /pwd/lang/eval-fail-assert.nix:2:12:
1| let {
2| x = arg: assert arg == "y"; 123;
| ^
3|
error: string '"x"' is not equal to string '"y"'