Add tests/f/lang/eval-okay-tryeval-failed-thunk-reeval
This commit is contained in:
@@ -0,0 +1 @@
|
||||
trace: throwing
|
||||
@@ -0,0 +1 @@
|
||||
"done"
|
||||
@@ -0,0 +1,7 @@
|
||||
# Since Nix 2.32, errors are memoized
|
||||
let
|
||||
# This attribute value will only be evaluated once.
|
||||
foo = builtins.trace "throwing" throw "nope";
|
||||
in
|
||||
# Trigger and catch the error twice.
|
||||
builtins.seq (builtins.tryEval foo).success builtins.seq (builtins.tryEval foo).success "done"
|
||||
Reference in New Issue
Block a user