In combination with Revise, some code (in ImageFiltering) that was initially written prior to the Julia-0.6 type system overhaul exposed the following inconsistency:
julia> foo(A::AbstractArray{_,N}, flags::NTuple{N,Bool}) where {_,N} = 1
foo (generic function with 1 method)
julia> foo(rand(2,2), (true, true)) # just to prove that the method works
1
julia> Tuple{AbstractArray{_,N}, NTuple{N,Bool}} where {_,N} # create the signature type
ERROR: syntax: all-underscore identifier used as rvalue
Obviously, post-0.6 the better way to write this is
julia> foo(A::AbstractArray{<:Any,N}, flags::NTuple{N,Bool}) where N = 1
foo (generic function with 1 method)
julia> Tuple{AbstractArray{<:Any,N}, NTuple{N,Bool}} where N
Tuple{AbstractArray{#s3,N} where #s3,Tuple{Vararg{Bool,N}}} where N
but the inconsistency should be fixed. In principle it seems that either option would be OK (throw an error on the method definition, or allow the Tuple-type to be created), with the obvious caveat that one of these is breaking.
Also while we're at it, I don't like the printing of
julia> Tuple{AbstractArray{<:Any,N}, NTuple{N,Bool}} where N
Tuple{AbstractArray{#s3,N} where #s3,Tuple{Vararg{Bool,N}}} where N
because you can't paste it back into the REPL. I've had to go through more than one time tracking down bugs and delete all the # in the types in my test case.
The issue here is just that _ is still allowed as a static parameter name, since the uses of _ in signatures are not quite normal rvalues. The safest thing is probably to disallow it, but that could be quite breaking since this seems like something people might actually write.
See also https://github.com/JuliaLang/julia/issues/29875, which specifically requests being able to use _ in a similar way.
And https://github.com/JuliaLang/julia/pull/24990 which proposes a conflicting meaning 馃槵
From triage: disallow in 1.x and see what happens.
This was just an oversight when _ as an r-value was deprecated. We should try disallowing and see what PkgEval says and make further decisions based on that.