From 643188d6e58dfd3270d689230867289347260b74 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 27 Aug 2019 10:28:09 -0300 Subject: Fixed missing case in 'luaV_finishOp' A metamethod call like '1 << a' was not being properly resumed if it got yielded. --- testes/coroutine.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'testes') 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) 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") -- cgit v1.2.3-55-g6feb