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

EmmyLua type dosen`t work in loop #1150

Closed
YiYeYu opened this issue May 17, 2022 · 2 comments
Closed

EmmyLua type dosen`t work in loop #1150

YiYeYu opened this issue May 17, 2022 · 2 comments
Labels
bug Something isn't working feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)

Comments

@YiYeYu
Copy link

YiYeYu commented May 17, 2022

Describe the bug

---@as type dosen`t work in loop

To Reproduce

    ---@type ExpandUIView
    local a;
    -- ---@type ExpandUIView
    -- local expandUI;
    for index, value in ipairs(nil) do
        ---@type ExpandUIView
        local expandUI;
    end

expandUI type is unkonw

Screenshots
image

Environment (please complete the following information):

  • OS: Windows
  • Client:VSCode
  • v3.2.3
@sewbacca
Copy link
Contributor

Wow that was new for me.
I found a workarround:

    for index, value in ipairs(nil) do
        local expandUI;
        ---@cast expandUI ExpandUIView
    end

@Arxareon
Copy link

While different in use, this seems to be the same root issue as #1158
It definitely was working before, and seems to be broken for a month or so (for a rough estimate).

@sumneko sumneko added bug Something isn't working feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats) labels May 24, 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 feat/LuaCats Annotations Related to Lua Language Server Annotations (LuaCats)
Projects
None yet
Development

No branches or pull requests

4 participants