Skip to content

Backport fixes, version 12.2.0#8268

Merged
cknitt merged 13 commits intomaintenance/12.xfrom
backport-12.2.0
Feb 27, 2026
Merged

Backport fixes, version 12.2.0#8268
cknitt merged 13 commits intomaintenance/12.xfrom
backport-12.2.0

Conversation

@cknitt
Copy link
Member

@cknitt cknitt commented Feb 27, 2026

Release 12.2.0 with some more fixes and the licensing update from master.

cknitt and others added 12 commits February 27, 2026 14:58
* Fix Parmatch crash on empty record head patterns

* Simpler test
When pattern matching on untagged variants with both an Object case and
a null/wildcard case, null (typeof "object") would incorrectly match
the object branch. Emit a null check before the typeof switch when both
conditions are present.

Fixes #8251

Signed-Off-By: Cristiano Calcagno <cristiano.calcagno@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ant switch (#8251)

Arrays also have typeof "object", so when there's an ObjectType typeof
case but no Array instanceof case, arrays would incorrectly match the
object branch. Add an Array.isArray guard alongside the null guard.

Also clean up the guard logic to use direct pattern matching instead of
intermediate list building.

Signed-Off-By: Cristiano Calcagno <cristiano.calcagno@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Port Belt.Array's zip, zipBy, partition, unzip to Stdlib Array

* Update completion test

* Update CHANGELOG

* Missed the PR link
# Conflicts:
#	packages/@rescript/runtime/lib/es6/Stdlib_Array.js
#	packages/@rescript/runtime/lib/js/Stdlib_Array.js
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8268

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8268

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8268

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8268

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8268

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8268

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8268

commit: 8f3fb7d

@cknitt cknitt merged commit 9929a14 into maintenance/12.x Feb 27, 2026
35 of 36 checks passed
@cknitt cknitt deleted the backport-12.2.0 branch February 27, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants