Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions spec/cli/gen_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ describe("tl gen", function()
local t = {1, 2, 3, 4}
print(table.unpack(t))
local t2 = table.pack(1, 2, "any")
local tcount = #t2
local n = 42
local maxi = math.maxinteger
local mini = math.mininteger
Expand All @@ -317,6 +318,7 @@ describe("tl gen", function()
local t = { 1, 2, 3, 4 }
print(table.unpack(t))
local t2 = table.pack(1, 2, "any")
local tcount = t2.n
local n = 42
local maxi = math.maxinteger
local mini = math.mininteger
Expand All @@ -336,6 +338,7 @@ describe("tl gen", function()
local t = { 1, 2, 3, 4 }
print(_tl_table_unpack(t))
local t2 = _tl_table_pack(1, 2, "any")
local tcount = t2.n
local n = 42
local maxi = _tl_math_maxinteger
local mini = _tl_math_mininteger
Expand All @@ -355,6 +358,7 @@ describe("tl gen", function()
local t = { 1, 2, 3, 4 }
print(_tl_table_unpack(t))
local t2 = _tl_table_pack(1, 2, "any")
local tcount = t2.n
local n = 42
local maxi = _tl_math_maxinteger
local mini = _tl_math_mininteger
Expand Down
5 changes: 4 additions & 1 deletion teal/default/stdlib.d.tl
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ global record table
is {A}

n: integer
metamethod __len: function(self): integer = macroexp(self): integer
return self.n
end
end

concat: function({(string | number)}, ? string, ? integer, ? integer): string
Expand All @@ -320,7 +323,7 @@ global record table
move: function<A>({A}, integer, integer, integer, ? {A}): {A}

pack: function<T>(T...): PackTable<T> --[[needs_compat]]
pack: function(any...): {any:any} --[[needs_compat]]
pack: function(any...): PackTable<any> --[[needs_compat]]

remove: function<A>({A}, ? integer): A
sort: function<A>({A}, ? SortFunction<A>)
Expand Down
64 changes: 32 additions & 32 deletions teal/precompiled/default_env.lua

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions tl.lua

Large diffs are not rendered by default.

Loading