luau/tests/conformance/apicalls.lua
rblanckaert b066e4c8f8
0.531 (#532)
* Fix free Luau type being fully overwritten by 'any' and causing UAF
* Fix lua_clonefunction implementation replacing top instead of pushing
* Falsey values other than false can now narrow refinements
* Fix lua_getmetatable, lua_getfenv not waking thread up
* FIx a case where lua_objlen could push a new string without thread wakeup or GC
* Moved Luau math and bit32 definitions to definition file 
* Improve Luau parse recovery of incorrect return type token
2022-06-10 09:58:21 -07:00

25 lines
450 B
Lua

-- This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
print('testing function calls through API')
function add(a, b)
return a + b
end
local m = { __eq = function(a, b) return a.a == b.a end }
function create_with_tm(x)
return setmetatable({ a = x }, m)
end
local gen = 0
function incuv()
gen += 1
return gen
end
pi = 3.1415926
function getpi()
return pi
end
return('OK')