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

Return type from string functions doesn't get infered correctly. #396

Closed
NightrainsRbx opened this issue Feb 19, 2021 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@NightrainsRbx
Copy link

When calling a function from the string library or a method from a string which returns string, the variable seems to infer the type, but the type infered doens't work.

For example:

test

I also tested the io library and file type and they do work, custom classes works too.

Adding ---@type string to variable seems to work better but after calling a function on the infered types it stops working:

test2

I also tried adding ---@type string* and it works just like the string literal and the library.

Environment:

OS: Windows
Client: VSCode
I'm using the latest version of lua language server (1.15.1).

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