Is there a way to get a tables metatable? e.g.
local tbl = {}
setmetatable(tbl, {__call = function() print("tbl called") end})
-- how to get metatable of tbl?
You can use getmetatable(tbl)
to get the assigned metatable (or nil
if none is assigned).