EmmyLua-LanguageServer icon indicating copy to clipboard operation
EmmyLua-LanguageServer copied to clipboard

迭代器类型错误

Open oscar20200122 opened this issue 5 years ago • 0 comments

运行环境: openjdk 11.0.6 2020-01-14 OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1) OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing) emacs:26 `---@class Car ---@field public name string @add name field to class Car, you'll see it in code completion local cls = class()

---@return Car[] local function createCars() end

---@type table<string, Car> local dict = {}

local car = dict['key'] -- car. and you'll see completion

for key, car in pairs(createCars()) do -- car. and you'll see completion end ` image

oscar20200122 avatar Feb 22 '20 12:02 oscar20200122