Repository navigation
Range patterns do not match missing - #137
Open
quinnj-bot[bot] wants to merge 2 commits into
Open
quinnj-bot[bot] wants to merge 2 commits into
quinnj-bot[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
missing in 1:3 is missing, which threw a TypeError in the generated boolean test instead of falling through to the next case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #137 +/- ##
=======================================
Coverage 99.38% 99.38%
=======================================
Files 12 12
Lines 1132 1132
=======================================
Hits 1125 1125
Misses 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Why
The docs say a constant range pattern such as
1:10"matches values in that range", and theirnum_match('c')example shows a non-number falling through to the_case. Amissinginput threw instead:What changed
Range patterns test
i in r, andmissing in 1:3ismissing. The generated code used that value as aBool. The range test now treatsmissingas "not in the range". All range patterns, in@match,@ismatchand@match pattern = value, go through this one method.No issue was filed. I found this while building a differential test harness for
@match.Verification
mainwith theTypeErrorabove and passes with the fix.Pkg.test()on Julia 1.12.6: 1063 passed, 5 broken (main: 1057 passed, the same 5 broken).libopenlibm.so: cannot enable executable stack). PR Fix @match on 32-bit Julia (hash seeds typed as UInt64) #134 shows the same failure; this PR does not touch CI.Review notes
in(==), so-0.0still matches0:1, as before.isequaloroccursin, which always return aBool. Guards are user code and keep their current behavior.🤖 Generated with Claude Code