Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
julia 0.6
Compat 0.30 # @nospecialize
Compat 0.33 # Compat.Test
4 changes: 2 additions & 2 deletions src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DocStringExtensions
using Base.Test
using Compat.Test

include("tests.jl")

8 changes: 6 additions & 2 deletions test/tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down