diff --git a/REQUIRE b/REQUIRE index 2845359..d2f6cd5 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,2 +1,2 @@ julia 0.6 -Compat 0.30 # @nospecialize +Compat 0.33 # Compat.Test diff --git a/src/utilities.jl b/src/utilities.jl index d7f934c..3c86219 100644 --- a/src/utilities.jl +++ b/src/utilities.jl @@ -105,7 +105,7 @@ $(:SIGNATURES) Is the type `t` a `bitstype`? """ -isbitstype(@nospecialize(t)) = isleaftype(t) && sizeof(t) > 0 && isbits(t) +isbitstype(@nospecialize(t)) = isconcrete(t) && sizeof(t) > 0 && isbits(t) """ $(:SIGNATURES) @@ -249,7 +249,7 @@ function keywords(func, m::Method) filter!(arg -> !contains(string(arg), "#"), kwargs) # Keywords *may* not be sorted correctly. We move the vararg one to the end. local index = findfirst(arg -> endswith(string(arg), "..."), kwargs) - if index > 0 + if index != nothing && index > 0 # TODO: use Compat.findfirst later on kwargs[index], kwargs[end] = kwargs[end], kwargs[index] end return kwargs diff --git a/test/runtests.jl b/test/runtests.jl index 883d055..56e1c5d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,5 @@ using DocStringExtensions -using Base.Test +using Compat.Test include("tests.jl") diff --git a/test/tests.jl b/test/tests.jl index 617f4e4..c37b535 100644 --- a/test/tests.jl +++ b/test/tests.jl @@ -93,7 +93,7 @@ end end @testset "format" begin # Setup. - doc = Docs.DocStr(Core.svec(), Nullable(), Dict()) + doc = Docs.DocStr(Core.svec(), nothing, Dict()) buf = IOBuffer() # Errors. @@ -378,7 +378,11 @@ end @test DSE.alltypesigs(Union{}) == Any[] @test DSE.alltypesigs(Union{Tuple{}}) == Any[Tuple{}] @test DSE.alltypesigs(Tuple{}) == Any[Tuple{}] - @test DSE.alltypesigs(Type{T} where {T}) == Any[Type{T} where T] + + # TODO: Clean me up + T = Type{T} where {T} + @test DSE.alltypesigs(T) == + Base.rewrap_unionall.(DSE.uniontypes(Base.unwrap_unionall(T)), T) end @testset "groupby" begin let groups = DSE.groupby(Int, Vector{Int}, collect(1:10)) do each