Add array @reduce, @filter, @any, @all, & @indices_of (#2419)

* wip: array reduce and any/all

* wip: continue adding more functional-like array module functions

* wip: documentation and other fixes

* finish unit tests, require INDEX variable in lambdas, ready for first review

* don't worry about iterating by ref (it wasn't passing it that way anyhow)

* update release notes again

* simplify, remove "summary operators" and related tests

* Use more $defined, remove "has_operator". Fix regression in `$defined(var $f = 123)`

---------

Co-authored-by: Christoffer Lerno <christoffer@aegik.com>
This commit is contained in:
Zack Puhl
2025-08-25 08:47:08 -04:00
committed by GitHub
parent 35c04cdc36
commit 410a25f334
4 changed files with 353 additions and 20 deletions

View File

@@ -4571,6 +4571,7 @@ bool sema_analyse_var_decl_ct(SemaContext *context, Decl *decl, bool *check_fail
default:
UNREACHABLE
}
if (check_failed) return true;
return sema_add_local(context, decl);
FAIL_CHECK:
if (check_failed)