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

Odd complaint about ---@cast #1317

Closed
muppet9010 opened this issue Jul 10, 2022 · 0 comments
Closed

Odd complaint about ---@cast #1317

muppet9010 opened this issue Jul 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@muppet9010
Copy link

I have the below code and the language server's odd complaint about a ---@cast. You can see I added the same cast a few lines later and it doesn't complain about that one (even if I remove the first one).

image

    ---@cast removedWeaponDetails - nil
    if flamethrowerGiven == nil then
        Logging.LogPrint(errorMessageStart .. "target player can't be given a flamethrower for some odd reason: " .. data.target)
        return
    end
    ---@cast removedWeaponDetails - nil```

On-hover over the type when its first returned by the function,
![image](https://user-images.githubusercontent.com/40836017/178158221-47ea862c-cb0b-48fa-94c0-d6822e7d4553.png)

@sumneko sumneko added the bug Something isn't working label Jul 11, 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