Remove misc.readonly

Fix #571
This commit is contained in:
hrsh7th
2021-11-23 23:22:22 +09:00
parent 6fa7681812
commit ac476e05df
3 changed files with 2 additions and 23 deletions

View File

@@ -168,19 +168,6 @@ misc.to_vimindex = function(text, utfindex)
return utfindex + 1
end
---Return readonly version object
---@generic T
---@param tbl T
---@return T
misc.readonly = function(tbl)
return setmetatable({}, {
__index = tbl,
__newindex = function()
error('this table is readonly.')
end,
})
end
---Mark the function as deprecated
misc.deprecated = function(fn, msg)
local printed = false