Aqua.jl complains about the following code for the structure StructBad
with the error Unbound type parameters detected
. Is this a real problem in the code or a false positive of Aqua? The structures StructOK2
and StructOK3
are fine.
using Aqua
module mymod
struct StructBad{N,TC}
field::NTuple{N,TC}
end
struct StructOK2{TC}
field::NTuple{2,TC}
end
struct StructOK3{N}
field::NTuple{N,Int}
end
end
Aqua.test_unbound_args(mymod)
The full error message is:
Unbound type parameters detected:
[1] Main.mymod.StructBad(field::Tuple{Vararg{TC, N}}) where {N, TC} @ Main.mymod ~/.julia/dev/CommonDataModel/test/test_aqua2.jl:5
Test Failed at /home/abarth/.julia/packages/Aqua/tHrmY/src/unbound_args.jl:37
Expression: isempty(unbounds)
Evaluated: isempty(Method[Main.mymod.StructBad(field::Tuple{Vararg{TC, N}}) where {N, TC} @ Main.mymod ~/.julia/dev/CommonDataModel/test/test_aqua2.jl:5])
ERROR: LoadError: There was an error during testing
in expression starting at /home/abarth/.julia/dev/CommonDataModel/test/test_aqua2.jl:18
(v1.10) pkg> st Aqua
Status `/mnt/data1/abarth/.julia/environments/v1.10/Project.toml`
[4c88cf16] Aqua v0.8.7
(v1.10) pkg>