Skip to content

Commit e6018d4

Browse files
committed
restrict DegreeSequence element type to a subtype of Integer
1 parent 5575094 commit e6018d4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/GraphProperties.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct PropertyComparison{
2929
end
3030

3131
let
32-
properties_abstractvector = Tuple{Symbol, String}[
32+
properties_abstractvector_integer = Tuple{Symbol, String}[
3333
(:DegreeSequence, "The *degree sequence* of an undirected graph."),
3434
]
3535
properties_real = Tuple{Symbol, String}[
@@ -104,7 +104,7 @@ let
104104
(:GraphIsSplitGraph, "Is an undirected graph a split graph?"),
105105
]
106106
for (typ, properties) (
107-
(AbstractVector, properties_abstractvector),
107+
(AbstractVector{<:Integer}, properties_abstractvector_integer),
108108
(Real, properties_real),
109109
(Integer, properties_integer),
110110
(Bool, properties_bool),

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ using Test
88
@test GraphIsChordal() isa GraphProperty{Bool}
99
@test Arboricity() isa GraphProperty{Integer}
1010
@test FractionalChromaticNumber() isa GraphProperty{Real}
11-
@test DegreeSequence() isa GraphProperty{AbstractVector}
11+
@test DegreeSequence() isa GraphProperty{AbstractVector{<:Integer}}
1212
end
1313
end
1414

0 commit comments

Comments
 (0)