mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-14 22:21:10 +00:00
b066e4c8f8
* 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
25 lines
450 B
Lua
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')
|