Skip to content

enum & bit operation #1675

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

Closed
RomanSpector opened this issue Nov 8, 2022 · 1 comment
Closed

enum & bit operation #1675

RomanSpector opened this issue Nov 8, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@RomanSpector
Copy link

How are you using the lua-language-server?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

image

Actual Behaviour

image

Reproduction steps

---@enum Enum
local Enum = {
    ENUM_0 = 0,
    ENUM_1 = 1,
    ENUM_2 = 2,
}

---@class Class
local Class =
{
    enum = 2,
}

---@param enum Enum
---@return boolean
function Class:HasEnum(enum)
    return bit.band(self.enum, enum) ~= 0;
end

Additional Notes

No response

Log File

No response

@sumneko
Copy link
Collaborator

sumneko commented Nov 8, 2022

Please checkout 3.6.0

@sumneko sumneko added the bug Something isn't working label Nov 8, 2022
@sumneko sumneko closed this as completed in f827400 Nov 8, 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