Skip to content

Function return type can't be determined when using "return somefunc(...)" statement. #563

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
MikuAuahDark opened this issue Jun 16, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@MikuAuahDark
Copy link

Describe the bug
When a function returns value from another function call, the caller function return type reverts to "any".

To Reproduce
This simple code tells everything.

local function failedReturnTypeDeduction()
	return string.sub("Hello", 2)
end

Then hover your cursor to failedReturnTypeDeduction.

Expected behavior
failedReturnTypeDeduction return type should be string since string.sub returns string.

Screenshots
gambar

Environment (please complete the following information):

  • OS: Windows
  • Is WSL remote? No
  • Client: VSCode

Provide logs
file_d%3A_Data_Development_love-11.3-win64_nlay.log

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