Fix integer range patterns at int32 boundaries - #8717
Open
fhammerschmidt wants to merge 2 commits into
Open
fhammerschmidt wants to merge 2 commits into
fhammerschmidt wants to merge 2 commits into
Conversation
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8717 +/- ##
==========================================
+ Coverage 78.95% 78.96% +0.01%
==========================================
Files 474 474
Lines 64231 64233 +2
==========================================
+ Hits 50711 50721 +10
+ Misses 13520 13512 -8
🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integer range patterns ending at
2147483647currently generate an exclusive upper-bound comparison against2147483648, which wraps to-2147483648in Lambda constants and makes matching values fall through. Use ReScript's signed 32-bit limits when constructing integer match intervals, so the record example in #8716 compiles tox.status >= 2147483645.Add runtime regressions and generated JavaScript snapshots for both limits, records, tuples, variants, arrays, function results, guards, and switches with distinct actions. This fix is intended for backport to
maintenance/12.xand the next v12 patch release alongside #8714.Fixes #8716.
Validation:
make testpasses, including formatting, 328 OUnit tests, 561 runtime tests, build fixtures, and 741 documentation examples.