Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The type of the argument of the returned function is not determined #1201

Closed
RomanSpector opened this issue Jun 13, 2022 · 0 comments
Closed
Labels
enhancement New feature or request feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Milestone

Comments

@RomanSpector
Copy link

---@class Car
---@field color string
local Car = {};

---@return Car
function Car:New() end

---@param any_car Car
---@return fun(car: Car): boolean
local function GenerateFn(any_car)
    ---@param car Car
    return function(car)
        return car == any_car;
    end
end

local myCar = Car:New();
local fn = GenerateFn(myCar);

The type of the argument of the returned function is not determined

Снимок экрана 2022-06-13 100117

Снимок экрана 2022-06-13 100048

@sumneko sumneko added enhancement New feature or request feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) labels Jun 13, 2022
@sumneko sumneko added this to the 3.6.0 milestone Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Projects
None yet
Development

No branches or pull requests

2 participants