lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

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

Open RomanSpector opened this issue 3 years ago • 0 comments

---@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

RomanSpector avatar Jun 13 '22 07:06 RomanSpector