luau/tests/conformance/apicalls.luau
ramdoys c1e2f650db
chore: update applicable .lua files to .luau (#1560)
Updates all of the APPLICABLE .lua files to the .luau file ending.

---------

Co-authored-by: ramdoys <ramdoysdirect@gmail.com>
2025-02-21 14:29:20 -08:00

33 lines
538 B
Text

-- 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
function largealloc()
table.create(1000000)
end
function oops()
return "oops"
end
return('OK')