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

Problem with the type of for loop variables #1218

Closed
NeOzay opened this issue Jun 16, 2022 · 1 comment
Closed

Problem with the type of for loop variables #1218

NeOzay opened this issue Jun 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@NeOzay
Copy link
Contributor

NeOzay commented Jun 16, 2022

Describe the bug
the type of variables have not been correctly filled in

To Reproduce

local t ---@type table<string, number>
for key, value in pairs(t) do
   print(key, value) --key or value is unknown
end

Screenshots
Screenshot_2022-06-16-09-37-13-31_84d3000e3f4017145260f7618db1d683

Environment:
Reproduced in VSCode on Windows and Neovim on Termux(Android shell emulator)

@sumneko
Copy link
Collaborator

sumneko commented Jun 16, 2022

I can not reproduce it, please provide your log

EDIT:I can reproduce with the key now

@sumneko sumneko added the bug Something isn't working label Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants