From e49ac8b7a2571a9960eee212e3dd3c167972cfc7 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 31 Aug 2024 22:34:12 -0300 Subject: [PATCH] fix: do not generate Lua table for interfaces --- tl.lua | 2 +- tl.tl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tl.lua b/tl.lua index 15fe568a1..60d0fda18 100644 --- a/tl.lua +++ b/tl.lua @@ -5075,7 +5075,7 @@ function tl.pretty_print_ast(ast, gen_target, mode) for fname, ftype in fields_of(typ) do if ftype.typename == "typedecl" then local def = ftype.def - if def.fields then + if def.typename == "record" then table.insert(out, fname) table.insert(out, " = ") table.insert(out, print_record_def(def)) diff --git a/tl.tl b/tl.tl index 982f280d8..5462194a1 100644 --- a/tl.tl +++ b/tl.tl @@ -5075,7 +5075,7 @@ function tl.pretty_print_ast(ast: Node, gen_target: GenTarget, mode?: boolean | for fname, ftype in fields_of(typ) do if ftype is TypeDeclType then local def = ftype.def - if def is RecordLikeType then + if def is RecordType then table.insert(out, fname) table.insert(out, " = ") table.insert(out, print_record_def(def))