-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test.detect_unbound_args
reports cases that are reasonable and harmless
#56698
Comments
I think in your example above, the problematic input is |
Yes, |
As you did in that issue, note that it is considered completely acceptable to add cases above the |
Unfortunately, in the sort case, probably due to kwargs, this produces three cases, all of which contain compiler generated names. That makes it hard to filter them out in test/ambiguous.jl: x@x:~$ julia +pr54494
A new version of Julia for the `pr54494` channel is available. Run:
juliaup update
to install the latest Julia for the `pr54494` channel.
o | Version 1.12.0-DEV.1704 (2024-11-26)
o o | lh/sort-tuple/5001cf98200 (fork: 11 commits, 3 days)
julia> using Test
julia> Test.detect_unbound_args(Base.Sort)
[1] var"#sort#25"(alg::Base.Sort.Algorithm, lt, by, rev::Union{Nothing, Bool}, order::Base.Order.Ordering, scratch::Union{Nothing, Vector{T}}, ::typeof(sort), x::NTuple{var"#s697", T} where var"#s697") where T @ Base.Sort sort.jl:1762
[2] sort(x::NTuple{var"#s696", T} where var"#s696"; alg, lt, by, rev, order, scratch) where T @ Base.Sort sort.jl:1762
[3] kwcall(::NamedTuple, ::typeof(sort), x::NTuple{var"#s695", T} where var"#s695") where T @ Base.Sort sort.jl:1762
That would be lovely, especially considering this behavior used throughout the package ecosystem via Aqua. |
If the unbound static parameter is not used in the function body, then it should not get reported by
detect_unbound_args
. There are perfectly valid functions that don't use their static parameters. For example:This causes spurious test failures in #54494
The text was updated successfully, but these errors were encountered: