fix: match Lua unary minus, for-in multi-return, and native range checks - #18
Merged
Merged
Conversation
Keep minus as a unary op so 1-2 and mininteger stay correct, preserve 1.0 as float, and fail closed on HTTP/INI/YAML/Redis/net bounds. Co-authored-by: Cursor <cursoragent@cursor.com>
Float source tokens now stay float in generated C, so the string checks must look for 1.0 and 0.0 instead of integer 1/0. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18 +/- ##
==========================================
- Coverage 87.89% 87.80% -0.10%
==========================================
Files 119 119
Lines 23842 24042 +200
==========================================
+ Hits 20955 21109 +154
- Misses 2887 2933 +46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
1-2,-1table keys, andmath.abs(mininteger)match Lua 5.4; expression values still treat1.0/0.0as floats.VmFunction::Mergetakes the latest arity.Test plan
jitter.nan_float_for,test_math.test_math_boundary_integer, unary-minus/for-in/method-order/native bound testsunit_testsstill re-running locally)Made with Cursor