Skip to content

Commit 429466e

Browse files
committed
Fix for old julias
1 parent 7370f3f commit 429466e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/utils.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ else
6767
type_parameter(@nospecialize t) = only(t.parameters)
6868
end
6969

70+
@static if !isdefined(Base, :only)
71+
only(iter) = first(iter)
72+
end
73+
7074
function is_kwcall(signature::Type)
7175
@static if VERSION < v"1.9"
7276
signature = Base.unwrap_unionall(signature)::DataType

test/test_exclude.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using Aqua: getexclude, normalize_exclude, normalize_exclude_obj, normalize_and_
1111
@assert rootmodule(Broadcast.Broadcasted) === Base
1212

1313
@testset "roundtrip" begin
14-
@testset for x in Any[
14+
for x in Any[
1515
foldl
1616
Some
1717
Tuple

0 commit comments

Comments
 (0)