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

3.6.5 --[[]] #1825

Closed
RomanSpector opened this issue Jan 16, 2023 · 2 comments
Closed

3.6.5 --[[]] #1825

RomanSpector opened this issue Jan 16, 2023 · 2 comments
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

Should not highlight the error

Actual Behaviour

image

Reproduction steps

---@param a string
local function test(a)
    print(a);
end

local a = 1;
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);
test(a --[[@as string]]);

Additional Notes

No response

Log File

No response

@StormFX
Copy link

StormFX commented Jan 16, 2023

I'm experiencing the same issue. The linter isn't recognizing long comments and strings as valid for Lua 5.1, when in fact they are.

Edit: Had to temporarily change the Lua version to 5.2 until it's fixed.

@Tuller
Copy link

Tuller commented Jan 16, 2023

I'm also experiencing the same issue with Lua 5.1. String literals of level 1 or greater like [=[ text ]=] seem to work OK.

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

4 participants