mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Fixed missing case in 'luaV_finishOp'
A metamethod call like '1 << a' was not being properly resumed if it got yielded.
This commit is contained in:
parent
3df5624ff4
commit
643188d6e5
2 changed files with 7 additions and 1 deletions
|
|
@ -747,6 +747,12 @@ assert(run(function () return a >> b end, {"shr"}) == 10 >> 12)
|
|||
assert(run(function () return 10 & b end, {"band"}) == 10 & 12)
|
||||
assert(run(function () return a | 2 end, {"bor"}) == 10 | 2)
|
||||
assert(run(function () return a ~ 2 end, {"bxor"}) == 10 ~ 2)
|
||||
assert(run(function () return a >> 2 end, {"shr"}) == 10 >> 2)
|
||||
assert(run(function () return 1 >> a end, {"shr"}) == 1 >> 10)
|
||||
assert(run(function () return a << 2 end, {"shl"}) == 10 << 2)
|
||||
assert(run(function () return 1 << a end, {"shl"}) == 1 << 10)
|
||||
assert(run(function () return a ~ 2 end, {"bxor"}) == 10 ~ 2)
|
||||
|
||||
|
||||
assert(run(function () return a..b end, {"concat"}) == "1012")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue