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
Optional parameter T after a varargs T doesn't have clear semantics in how it's defined.
Example
proctest(a: varargs[string], b ="") =echo"a=", a
echo"b=", b
test("hello")
test("hello", "world", "!")
Actual Output
a=["hello"]
b=
a=["hello", "world"]
b=!
Expected Output
Not too sure...
Possible Solution
In my opinion, emitting a warning that says something along the lines "optional T after varargs T will cause the last argument of type T to be passed to the optional parameter!"