about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-12T07·06-0800
committerclbot <clbot@tvl.fyi>2023-12-12T15·54+0000
commite516046ed28d6b85fc683cfe39d2b4035e68d975 (patch)
treeec4fd92fbc8654654bb6087f696fe22693459703 /tvix/eval/src
parent663362f3df5cc62218db8b443a77b2d78240092a (diff)
test(tvix/eval): test catchables in named formals r/7185
Relates to b/348.

$ /git/depot/result/bin/tvix -E '(builtins.tryEval (({ fred }: "bob") (throw "3"))).success'
note: while evaluating this Nix code
 --> [code]:1:1
  |
1 | (builtins.tryEval (({ fred }: "bob") (throw "3"))).success
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: while evaluating this as native code (force)
 --> [code]:1:1
  |
1 | (builtins.tryEval (({ fred }: "bob") (throw "3"))).success
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: while evaluating this as native code (tryEval)
 --> [code]:1:2
  |
1 | (builtins.tryEval (({ fred }: "bob") (throw "3"))).success
  |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: while evaluating this Nix code
 --> [code]:1:20
  |
1 | (builtins.tryEval (({ fred }: "bob") (throw "3"))).success
  |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E006]: expected value of type 'set', but found a 'internal[catchable]'
 --> [code]:1:21
  |
1 | (builtins.tryEval (({ fred }: "bob") (throw "3"))).success
  |                     ^^^^^^^^

Change-Id: I730fdd996f7e1b81dbbf83dc1524104a8cad2f78
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10295
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: Adam Joseph <adam@westernsemico.com>
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.exp1
-rw-r--r--tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.nix1
2 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.exp b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.exp
new file mode 100644
index 0000000000..c508d5366f
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.exp
@@ -0,0 +1 @@
+false
diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.nix b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.nix
new file mode 100644
index 0000000000..df6726db76
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-catchable-passed-to-function-with-formals.nix
@@ -0,0 +1 @@
+(builtins.tryEval (({ fred }: "bob") (throw "3"))).success