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

Incorrect type signature on assert #1476

Closed
stellartux opened this issue Aug 16, 2022 · 0 comments
Closed

Incorrect type signature on assert #1476

stellartux opened this issue Aug 16, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@stellartux
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?

Type Checking, Diagnostics/Syntax Checking

Expected Behaviour

The assert function takes any number of arguments and returns all of its arguments.

local x, y, z = assert(1, 2, 3)

The type hints for x, y and z should all be integer. None of the parameters of assert are redundant.

Actual Behaviour

The type hinting shows assert returning only a single argument. The type hint for x is integer, y and z have nil. The third parameter is highlighted as redundant.

Reproduction steps

Enter the following code in the editor.

local x, y, z = assert(1, 2, 3)

Additional Notes

No response

Log File

No response

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