lune-org/lune

`__tostring` metamethod not being called in formatter

Opened this issue · 0 comments

Example:

local t = setmetatable({}, { __tostring = "Foo" })

print(t) --> { } (should be Foo)

This happens because the formatter has an additional layer for formatting tables (handling recursive references, depth limits, etc) and this does not check for any __tostring metamethod even though the basic value formatter layer does.