Skip to content

Commit

Permalink
fix: do not generate Lua table for interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Sep 2, 2024
1 parent 1dd8f9e commit e49ac8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tl.tl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit e49ac8b

Please sign in to comment.