JuliaLang/julia — pull request #7935 by timholy (2014-08-09 13:46:20+00:00)
Title: For caching staged methods, don't restrict the number of varargs to match

Note this is a PR against `kf/staged`, not master.

This fixes the main remaining issues with splatting:
```julia
julia> stagedfunction h(a...)
@show a
:nothing
end
h (generic function with 1 method)

julia> h(1:5, 3, 3:3)
a => (UnitRange{Int64},Int64,UnitRange{Int64})

julia> h(1:5, 3, 3:3)

julia> h(1:5, 3:3, 3)
a => (UnitRange{Int64},UnitRange{Int64},Int64)

julia> h(1:5, 3:3, 3)

julia> h(1:5, 3) # not correct

julia> h(3, 1:5)
a => (Int64,UnitRange{Int64})
```
I suspect that one remaining problem is due to [this line](https://github.com/timholy/julia/blob/86c0c47a69dfe8caad2273331ac27f43f4a15743/src/gf.c#L279). What's the reason for allowing a match when `n == lensig-1`?