Skip to content

Incorrect missing-return when return is inside a while true loop #933

@rijenkii

Description

@rijenkii

Code:

---@return integer
function test()
  while true do
    return 123
  end
end

Final end is highlighted with the following message:

Annotations specify that a return value is required here. EmmyLua(missing-return)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions