You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
610 B
30 lines
610 B
-- Bugs
|
|
-- issue 210
|
|
do
|
|
debug.setmetatable(1, {
|
|
__index = function() return "hello" end,
|
|
__len = function() return "123" end
|
|
})
|
|
assert((10)[1] == 'hello')
|
|
local function f(x:integer[])
|
|
return #(x[1]) + 1
|
|
end
|
|
local function f2(x:integer[])
|
|
return #x[1] + 1
|
|
end
|
|
assert(f(table.intarray(2)) == 124)
|
|
assert(f2(table.intarray(2)) == 124)
|
|
debug.setmetatable(1, nil)
|
|
end
|
|
print 'Ok'
|
|
|
|
-- issue
|
|
do
|
|
local x: integer[] = {4}
|
|
local y: number[] = {4.2}
|
|
local function f()
|
|
return x[1] + 1, y[1] + 2.2
|
|
end
|
|
ravi.dumplua(f)
|
|
end
|