mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
* Implemented tryEval, the last missing primop in the fast-eval
branch. Also added a test for tryEval.
This commit is contained in:
parent
1a8eb6e3ec
commit
81a4b4e49b
3 changed files with 12 additions and 12 deletions
1
tests/lang/eval-okay-tryeval.exp
Normal file
1
tests/lang/eval-okay-tryeval.exp
Normal file
|
@ -0,0 +1 @@
|
|||
{ x = { value = "x"; success = true; }; y = { value = false; success = false; }; z = { value = false; success = false; }; }
|
5
tests/lang/eval-okay-tryeval.nix
Normal file
5
tests/lang/eval-okay-tryeval.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
x = builtins.tryEval "x";
|
||||
y = builtins.tryEval (assert false; "y");
|
||||
z = builtins.tryEval (throw "bla");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue