From 293c3d28875d61591ba9cdae5c62fc1d375907c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Perrad?= Date: Mon, 10 Jul 2023 19:21:01 +0200 Subject: [PATCH] fix utf8.codes signature (#675) code point is a number --- tl.lua | 2 +- tl.tl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tl.lua b/tl.lua index 5814cbc7e..7ae8b9b5e 100644 --- a/tl.lua +++ b/tl.lua @@ -5562,7 +5562,7 @@ local function init_globals(lax) ["charpattern"] = STRING, ["codepoint"] = a_type({ typename = "function", args = TUPLE({ STRING, OPT(NUMBER), OPT(NUMBER) }), rets = VARARG({ INTEGER }) }), ["codes"] = a_type({ typename = "function", args = TUPLE({ STRING }), rets = TUPLE({ - a_type({ typename = "function", args = TUPLE({}), rets = TUPLE({ NUMBER, STRING }) }), + a_type({ typename = "function", args = TUPLE({}), rets = TUPLE({ NUMBER, NUMBER }) }), }), }), ["len"] = a_type({ typename = "function", args = TUPLE({ STRING, NUMBER, NUMBER }), rets = TUPLE({ INTEGER }) }), ["offset"] = a_type({ typename = "function", args = TUPLE({ STRING, NUMBER, NUMBER }), rets = TUPLE({ INTEGER }) }), diff --git a/tl.tl b/tl.tl index dbccfff1e..f4ac554fb 100644 --- a/tl.tl +++ b/tl.tl @@ -5562,7 +5562,7 @@ local function init_globals(lax: boolean): {string:Variable}, {string:Type} ["charpattern"] = STRING, ["codepoint"] = a_type { typename = "function", args = TUPLE { STRING, OPT(NUMBER), OPT(NUMBER) }, rets = VARARG { INTEGER } }, ["codes"] = a_type { typename = "function", args = TUPLE { STRING }, rets = TUPLE { - a_type { typename = "function", args = TUPLE {}, rets = TUPLE { NUMBER, STRING } }, + a_type { typename = "function", args = TUPLE {}, rets = TUPLE { NUMBER, NUMBER } }, }, }, ["len"] = a_type { typename = "function", args = TUPLE { STRING, NUMBER, NUMBER }, rets = TUPLE { INTEGER } }, ["offset"] = a_type { typename = "function", args = TUPLE { STRING, NUMBER, NUMBER }, rets = TUPLE { INTEGER } },