EmmyLua / EmmyLua-LanguageServer

153 stars 28 forks source link

迭代器类型错误 #23

Closed oscar20200122 closed 1 month ago

oscar20200122 commented 4 years ago

运行环境: 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