Skip to content

Commit

Permalink
debug: simplify TypeChecker tostring output
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm committed Jan 13, 2025
1 parent 32e5370 commit 212833d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13743,7 +13743,10 @@ self:expand_type(node, values, elements) })

self.cache_std_metatable_type = env.globals["metatable"] and (env.globals["metatable"].t).def

setmetatable(self, { __index = TypeChecker })
setmetatable(self, {
__index = TypeChecker,
__tostring = function() return "TypeChecker" end,
})

self.feat_lax = set_feat(opts.feat_lax or env.defaults.feat_lax, false)
self.feat_arity = set_feat(opts.feat_arity or env.defaults.feat_arity, true)
Expand Down
5 changes: 4 additions & 1 deletion tl.tl
Original file line number Diff line number Diff line change
Expand Up @@ -13743,7 +13743,10 @@ do

self.cache_std_metatable_type = env.globals["metatable"] and (env.globals["metatable"].t as TypeDeclType).def

setmetatable(self, { __index = TypeChecker })
setmetatable(self, {
__index = TypeChecker,
__tostring = function(): string return "TypeChecker" end,
})

self.feat_lax = set_feat(opts.feat_lax or env.defaults.feat_lax, false)
self.feat_arity = set_feat(opts.feat_arity or env.defaults.feat_arity, true)
Expand Down

0 comments on commit 212833d

Please sign in to comment.