Skip to content

Method calls (:) are not handled correctly if the method definition does not use : #302

@raiguard

Description

@raiguard

Image

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"
  }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions