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.
ravi/tests/language/ravi_tests2.ravi

20 lines
445 B

# Bugs
# issue 208
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'