Skip to content

Commit

Permalink
remove a broken convert() method and test that it was unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeits committed Oct 24, 2017
1 parent 11f371d commit 992a4a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/FixedSizeArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ macro fixed_vector(name, parent)
end
@inline Base.Tuple(v::$(name)) = v.data
@inline Base.convert(::Type{$(name){S, T}}, x::NTuple{S, T}) where {S, T} = $(name){S, T}(x)
@inline Base.convert(::Type{$(name)}, x::StaticVector) = SV(x)
@inline function Base.convert(::Type{$(name){S, T}}, x::Tuple) where {S, T}
$(name){S, T}(convert(NTuple{S, T}, x))
end
Expand Down
3 changes: 3 additions & 0 deletions test/fixed_size_arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ for N = (1, 10)
# from other FSA without parameters
v2 = VT2(v1)

# No-op conversion to same type without parameters
@test convert(VT, v1) === v1

@test typeof(v2) == VT2{N, ET}
@test length(v2) == N
@test eltype(v2) == ET
Expand Down

0 comments on commit 992a4a2

Please sign in to comment.