_ is traditionally used to denote an ignored argument/variable, and it frequently makes sense to have more than one:
function(_,_) return 0 end
So throwing
[Error] This variable will overwrite another same-named variable in the same scope
in this case is somewhat counterproductive.
I would've preferred to declare the function in question as function() return 0 end in the first place, but that opens a whole new can of worms, since neither
(function(integer, integer) --> integer) | (function() --> integer)
nor
function(...:integer) --> integer
are valid types. And
is not a subtype of
function(integer?, integer?) --> integer
either.