fix(tvix/eval): builtins.filter: propagate catchables
This commit fixes builtins.filter so it propagates catchables correctly. Change-Id: Ib23a383bc5e272e42052205ffd1e94649a0ebc47 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10313 Autosubmit: Adam Joseph <adam@westernsemico.com> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
25dd1458b9
commit
1ddfed9825
3 changed files with 7 additions and 2 deletions
|
@ -316,8 +316,11 @@ mod pure_builtins {
|
||||||
|
|
||||||
for value in list {
|
for value in list {
|
||||||
let result = generators::request_call_with(&co, pred.clone(), [value.clone()]).await;
|
let result = generators::request_call_with(&co, pred.clone(), [value.clone()]).await;
|
||||||
|
let verdict = generators::request_force(&co, result).await;
|
||||||
if generators::request_force(&co, result).await.as_bool()? {
|
if verdict.is_catchable() {
|
||||||
|
return Ok(verdict);
|
||||||
|
}
|
||||||
|
if verdict.as_bool()? {
|
||||||
out.push_back(value);
|
out.push_back(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
false
|
|
@ -0,0 +1 @@
|
||||||
|
(builtins.tryEval (builtins.filter (_: throw "fred") [ 3 ])).success
|
Loading…
Reference in a new issue