From a379928a4431b242f27eeffce1d63e05e698efcc Mon Sep 17 00:00:00 2001 From: JLPLabs LLC Date: Mon, 30 Oct 2023 18:04:54 -0500 Subject: [PATCH] fix signature and return values for debug.getlocal; issue #713 --- tl.lua | 1 + tl.tl | 1 + 2 files changed, 2 insertions(+) diff --git a/tl.lua b/tl.lua index b4376244c..5d6d1feb3 100644 --- a/tl.lua +++ b/tl.lua @@ -5315,6 +5315,7 @@ local function init_globals(lax) types = { a_type({ typename = "function", args = TUPLE({ THREAD, FUNCTION, NUMBER }), rets = TUPLE({}) }), a_type({ typename = "function", args = TUPLE({ FUNCTION, NUMBER }), rets = TUPLE({}) }), + a_type({ typename = "function", args = TUPLE({ NUMBER, NUMBER }), rets = TUPLE({ STRING, ANY }) }), }, }), ["getmetatable"] = a_gfunction(1, function(a) return { args = TUPLE({ a }), rets = TUPLE({ METATABLE(a) }) } end), diff --git a/tl.tl b/tl.tl index 097316383..26d1e1612 100644 --- a/tl.tl +++ b/tl.tl @@ -5315,6 +5315,7 @@ local function init_globals(lax: boolean): {string:Variable}, {string:Type} types = { a_type { typename = "function", args = TUPLE { THREAD, FUNCTION, NUMBER }, rets = TUPLE {} }, a_type { typename = "function", args = TUPLE { FUNCTION, NUMBER }, rets = TUPLE {} }, + a_type { typename = "function", args = TUPLE { NUMBER, NUMBER }, rets = TUPLE { STRING, ANY } }, }, }, ["getmetatable"] = a_gfunction(1, function(a: Type): Type return { args = TUPLE { a }, rets = TUPLE { METATABLE(a) } } end),