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

Overload intellisense issue with type of parameters #2708

Open
Rathoz opened this issue Jun 12, 2024 · 0 comments
Open

Overload intellisense issue with type of parameters #2708

Rathoz opened this issue Jun 12, 2024 · 0 comments

Comments

@Rathoz
Copy link
Contributor

Rathoz commented Jun 12, 2024

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

Expected Behaviour

a is string|number

Actual Behaviour

a is string

Reproduction steps

---@overload fun(a: string): string
---@overload fun(a: number): table
function Foo.Bar(a)
	-- `a` is incorrectly assumed to be a `string`
	return a:lower() -- This does not error while it should!
end

Additional Notes

No response

Log File

No response

@Rathoz Rathoz changed the title Overload intellisense issue Overload intellisense issue with type of parameters Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant