We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Adding a type assertion to a function call has the (runtime) effect of truncating any returned values to a maximum of one value:
local function multipleReturns() return 1, 2 end print(multipleReturns() :: any)
This will output "1".
Currently, the 'remove_types' rule translates line 4 as:
print(multipleReturns())
This will output both "1" and "2", incorrectly.
The 'remove_types' rule should wrap these type-asserted calls in parentheses:
print((multipleReturns()))
This will output "1", correctly.
The text was updated successfully, but these errors were encountered:
Good catch! This should be a simple fix, I already have this kind of verification in other parts of darklua
Sorry, something went wrong.
remove_types
Successfully merging a pull request may close this issue.
Adding a type assertion to a function call has the (runtime) effect of truncating any returned values to a maximum of one value:
This will output "1".
Currently, the 'remove_types' rule translates line 4 as:
This will output both "1" and "2", incorrectly.
The 'remove_types' rule should wrap these type-asserted calls in parentheses:
This will output "1", correctly.
The text was updated successfully, but these errors were encountered: