Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua 5.4 no string coercion in bitwise operations #52

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

arnodel
Copy link
Owner

@arnodel arnodel commented Jan 11, 2022

From the Lua 5.4 docs

The coercion of strings to numbers in arithmetic and bitwise operations has been removed from the core language.

This is implemented in this PR, with some Lua tests

Note that it breaks the Lua 5.3 Test Suite, so CI is broken until I switch to the Lua 5.4 Test Suite

(No string coercion)
With Lua tests
@arnodel arnodel added this to the Lua 5.4 milestone Jan 11, 2022
@codecov
Copy link

codecov bot commented Jan 11, 2022

Codecov Report

Merging #52 (ca49b8e) into master (4643709) will increase coverage by 0.27%.
The diff coverage is 89.92%.

❗ Current head ca49b8e differs from pull request most recent head 4ab8de5. Consider uploading reports for the commit 4ab8de5 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   86.07%   86.35%   +0.27%     
==========================================
  Files          90       90              
  Lines        9819     9920     +101     
==========================================
+ Hits         8452     8566     +114     
+ Misses       1076     1063      -13     
  Partials      291      291              
Impacted Files Coverage Δ
runtime/cont.go 22.58% <ø> (ø)
runtime/thread.go 85.14% <80.76%> (+6.52%) ⬆️
runtime/luacont.go 90.05% <90.32%> (+0.82%) ⬆️
lib/coroutine/coroutine.go 85.24% <100.00%> (+2.22%) ⬆️
parsing/parser.go 92.29% <100.00%> (+0.77%) ⬆️
runtime/error.go 86.41% <100.00%> (+3.08%) ⬆️
runtime/gocont.go 92.20% <100.00%> (+0.10%) ⬆️
runtime/termination.go 78.46% <100.00%> (+3.85%) ⬆️
runtime/value.go 86.91% <0.00%> (+0.62%) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4643709...4ab8de5. Read the comment docs.

@arnodel arnodel changed the base branch from master to lua5.4 January 12, 2022 15:40
@arnodel arnodel merged commit 6096e60 into lua5.4 Jan 21, 2022
@arnodel arnodel deleted the lua-5.4-no-string-coercion-in-bitwise branch January 21, 2022 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants