lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


You can already solve it with a wrapper, something like;

local function deprecated(fn, msg)
  return function(...)
    print(msg)
    return fn(...)
  end
end

local add = deprecated(function(a, b)
  return a + b
end, "function add has been deprecated")


add(1, 2) --warning