I am puzzled by the behavior of @inbounds for functions with a variable number of arguments. My understanding is that calling the following function g should avoid a bounds check inside f.

@inline function f(x...)
@boundscheck println("checking bounds")
return 0
end
g(x...) = @inbounds f(x...)

However, this is what I get:

julia> g(1) # OK
0
julia> g(1,1) # why is this?
checking bounds
0
julia> g(1) # and why does this suddenly change?
checking bounds
0