Module:fun/isCallable: Difference between revisions

m Protected "Module:fun/isCallable": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
 
m 1 revision imported
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
local debug_track_module = "Module:debug/track"
local table_get_metamethod_module = "Module:table/getMetamethod"
local table_get_metamethod_module = "Module:table/getMetamethod"


local require = require
local require = require
local type = type
local type = type
local function debug_track(...)
debug_track = require(debug_track_module)
return debug_track(...)
end


local function get_metamethod(...)
local function get_metamethod(...)
Line 34: Line 28:
-- `obj` is callable without actually calling it.
-- `obj` is callable without actually calling it.
elseif not success then
elseif not success then
debug_track("fun/isCallable/protected metatable")
if allow_maybe then
if allow_maybe then
return nil
return nil