mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
Bug: wrong code gen. for indices with comparisons
In function 'luaK_exp2val', used to generate code for indices: Macro 'hasjumps' does not consider the case when the whole expression is a "jump" (a test). In all other of its uses, the surrounding code ensures that the expression cannot be VJMP.
This commit is contained in:
parent
30982bec96
commit
782ef85b22
2 changed files with 10 additions and 1 deletions
|
|
@ -3,6 +3,14 @@
|
|||
|
||||
print "testing closures"
|
||||
|
||||
do -- bug in 5.4.7
|
||||
_ENV[true] = 10
|
||||
local function aux () return _ENV[1 < 2] end
|
||||
assert(aux() == 10)
|
||||
_ENV[true] = nil
|
||||
end
|
||||
|
||||
|
||||
local A,B = 0,{g=10}
|
||||
local function f(x)
|
||||
local a = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue