diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-27 10:28:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-27 10:28:09 -0300 |
commit | 643188d6e58dfd3270d689230867289347260b74 (patch) | |
tree | da7fc432f23d07ddaf02e91bda6bc3e5fa67952d /testes | |
parent | 3df5624ff432b340fe122988fe6d025ad3217946 (diff) | |
download | lua-643188d6e58dfd3270d689230867289347260b74.tar.gz lua-643188d6e58dfd3270d689230867289347260b74.tar.bz2 lua-643188d6e58dfd3270d689230867289347260b74.zip |
Fixed missing case in 'luaV_finishOp'
A metamethod call like '1 << a' was not being properly resumed
if it got yielded.
Diffstat (limited to 'testes')
-rw-r--r-- | testes/coroutine.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testes/coroutine.lua b/testes/coroutine.lua index 26ed1f6a..48f4c5bf 100644 --- a/testes/coroutine.lua +++ b/testes/coroutine.lua | |||
@@ -747,6 +747,12 @@ assert(run(function () return a >> b end, {"shr"}) == 10 >> 12) | |||
747 | assert(run(function () return 10 & b end, {"band"}) == 10 & 12) | 747 | assert(run(function () return 10 & b end, {"band"}) == 10 & 12) |
748 | assert(run(function () return a | 2 end, {"bor"}) == 10 | 2) | 748 | assert(run(function () return a | 2 end, {"bor"}) == 10 | 2) |
749 | assert(run(function () return a ~ 2 end, {"bxor"}) == 10 ~ 2) | 749 | assert(run(function () return a ~ 2 end, {"bxor"}) == 10 ~ 2) |
750 | assert(run(function () return a >> 2 end, {"shr"}) == 10 >> 2) | ||
751 | assert(run(function () return 1 >> a end, {"shr"}) == 1 >> 10) | ||
752 | assert(run(function () return a << 2 end, {"shl"}) == 10 << 2) | ||
753 | assert(run(function () return 1 << a end, {"shl"}) == 1 << 10) | ||
754 | assert(run(function () return a ~ 2 end, {"bxor"}) == 10 ~ 2) | ||
755 | |||
750 | 756 | ||
751 | assert(run(function () return a..b end, {"concat"}) == "1012") | 757 | assert(run(function () return a..b end, {"concat"}) == "1012") |
752 | 758 | ||