You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a method which accepts either 1 or 2 parameters by using an overload.
local function returnTwoNumbers()
return 1,2
end
---@param _number1 number
---@param _number2 number
---@overload fun(_number1:number)
local function acceptOneOrTwoNumbers(_number1, _number2)
end
acceptOneOrTwoNumbers(1, 2)
acceptOneOrTwoNumbers(returnTwoNumbers())
What happens?
When passing 2 parameters manually there's no warning message, as expected.
However when using a function which returns 2 values, IntelliJ underlines the function call with the following warning: 0 results are excess arguments
What were you expecting to happen?
No warning to be given since its a valid function call.
The text was updated successfully, but these errors were encountered:
Good timing, as far as bug reports go. I'm working on #58, so fundamentally making a bunch of changes to parameter handling. Planning on making another official release toward the end of the week.
Environment
Lua
Type Safety
What are the steps to reproduce this issue?
Have a method which accepts either 1 or 2 parameters by using an overload.
What happens?
When passing 2 parameters manually there's no warning message, as expected.
However when using a function which returns 2 values, IntelliJ underlines the function call with the following warning:
0 results are excess arguments
What were you expecting to happen?
No warning to be given since its a valid function call.
The text was updated successfully, but these errors were encountered: