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

迭代器类型错误 #23

Open
oscar20200122 opened this issue Feb 22, 2020 · 0 comments
Open

迭代器类型错误 #23

oscar20200122 opened this issue Feb 22, 2020 · 0 comments

Comments

@oscar20200122
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant