swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(es/parser): parse mixed Flow anonymous callable params (#11786) ## Summary - fix Flow callable type lookahead for mixed anonymous and named params such as `(() => A, b: B) => C` - preserve existing Flow AST behavior by synthesizing the first anonymous param and keeping following named params intact - add a Flow fixture for the minimal repro and the React Native-style multiline case Closes #11785 ## Testing - `git submodule update --init --recursive` - `UPDATE=1 RUSTUP_TOOLCHAIN=nightly-2026-03-28 cargo test -p swc_ecma_parser --features flow --test flow spec_tests__flow__issue_11785_anon_first_callable_param__basic_js -- --ignored` - `RUSTUP_TOOLCHAIN=nightly-2026-03-28 cargo test -p swc_ecma_parser --features flow --test flow spec_tests__flow__issue_11785_anon_first_callable_param__basic_js -- --ignored` - `RUSTUP_TOOLCHAIN=nightly-2026-03-28 cargo test -p swc_ecma_parser --features flow` - `RUSTUP_TOOLCHAIN=nightly-2026-03-28 cargo test -p swc_ecma_parser` - `RUSTUP_TOOLCHAIN=nightly-2026-03-28 cargo fmt --all` - `RUSTUP_TOOLCHAIN=nightly-2026-03-28 cargo clippy -p swc_ecma_parser --all-targets --features flow -- -D warnings` ## Notes - `cargo clippy --all --all-targets -- -D warnings` currently fails on an unrelated existing lint in `crates/swc_ecma_minifier/src/compress/pure/bools.rs`. - The repo-pinned `nightly-2026-04-10` toolchain is partially installed in this environment, so the successful verification above used installed `nightly-2026-03-28`.
main
10 hours ago
Create gentle-shirts-know.md
kdy1:kdy1/fix-flow-callable-11785
10 hours ago
chore: Add changeset for #11785
oblador:fix/flow-unnamed-fn-args
11 hours ago
fix(es/parser): Fix Flow callable type with unnamed fn-type param (#11785) When a Flow callable type has an unnamed function-type parameter followed by named parameters (e.g. `(() => A, b: B) => C`), the parser now correctly handles this by falling back to a speculative parse via the regular function type parser, whose binding-list handler supports mixed anonymous and named parameters. Previously, `try_parse_flow_anon_fn_type` would bail on encountering a named parameter, and `is_ts_start_of_fn_type` would fail because it didn't recognize `(` as a valid function parameter start. The parser would then try to parse `(() => A, ...)` as a parenthesized type and error on the comma. Also defensively clear `DisallowFlowAnonFnType` context when parsing parameter types in `try_parse_flow_anon_fn_type` and `try_parse_flow_anon_signature_param` so nested anonymous function types like `() => A` are always allowed as parameters.
oblador:fix/flow-unnamed-fn-args
11 hours ago
fix(es/parser): parse mixed Flow anonymous callable params (#11785)
kdy1:kdy1/fix-flow-callable-11785
14 hours ago
build: Update `rustc` to `nightly-2026-04-10` (#11783) ## Summary - update the repo root `rust-toolchain` to `nightly-2026-04-10` - keep fixture-local toolchains unchanged - apply compatibility fixes needed to keep making progress on latest-nightly validation ## Verification - `git submodule update --init --recursive` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` *(currently failing with additional latest-nightly lint fallout in `swc_css_minifier` and `swc_css_codegen`)* - `cargo test -p swc_allocator --features nightly` *(currently failing in external dependency `bumpalo 3.19.0` with `AllocErr`/`AllocError` type mismatch)* ## Notes - this PR is draft because the nightly upgrade exposes more follow-up fixes than the initial toolchain pin bump - root toolchain bump and the first round of compatibility cleanup are included here so the remaining work can be reviewed incrementally
main
3 days ago
fix: resolve remaining nightly CI failures
kdy1:kdy1/update-rustc-nightly-2026-04-10
3 days ago
fix: address latest nightly CI fallout
kdy1:kdy1/update-rustc-nightly-2026-04-10
3 days ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(es/parser): parse mixed Flow anonymous callable params (#11785)
#11786
10 hours ago
f12b6e6
kdy1:kdy1/fix-flow-callable-11785
CodSpeed Performance Gauge
-3%
fix(es/parser): Fix Flow callable type with unnamed fn-type param
#11787
11 hours ago
304206e
oblador:fix/flow-unnamed-fn-args
CodSpeed Performance Gauge
+27%
build: Update `rustc` to `nightly-2026-04-10`
#11783
3 days ago
2630932
kdy1:kdy1/update-rustc-nightly-2026-04-10
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs