
Expected: data:extend should not throw any warnings.
Changing the definition to data:extend(_otherdata) fixes it, but it ought to function correctly in both cases.
The actual code can be found here.
Code
--- @class data
data = {}
data.raw = {}
data.is_demo = false
--- @param _self data
function data.extend(_self, _otherdata)
-- Impl
end
data:extend({
{
type = "item",
name = "my-item",
},
})
data.extend(data, {
{
type = "item",
name = "my-item"
}
})