A module:
module M
f(::Tuple{}) = nothing
f(::NTuple{n, F}) where {n, F} = F
end
The second method gets flagged as having an unbound argument, even though the first method protects it from ever being called in such a situation:
julia> detect_unbound_args(M)
[1] f(::Tuple{Vararg{F, n}}) where {n, F} in Main.M at REPL[2]:3
Should this be considered a bug? If not, detect_unbound_args
seems useless, as this seems like a very basic false positive. Hope I’m not misunderstanding Julia 101 or something.
This happens with both Julia nightly and with 1.8.5.