Skip to content

Commit 992a4a2

Browse files
committed
remove a broken convert() method and test that it was unnecessary
1 parent 11f371d commit 992a4a2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/FixedSizeArrays.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ macro fixed_vector(name, parent)
157157
end
158158
@inline Base.Tuple(v::$(name)) = v.data
159159
@inline Base.convert(::Type{$(name){S, T}}, x::NTuple{S, T}) where {S, T} = $(name){S, T}(x)
160-
@inline Base.convert(::Type{$(name)}, x::StaticVector) = SV(x)
161160
@inline function Base.convert(::Type{$(name){S, T}}, x::Tuple) where {S, T}
162161
$(name){S, T}(convert(NTuple{S, T}, x))
163162
end

test/fixed_size_arrays.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ for N = (1, 10)
171171
# from other FSA without parameters
172172
v2 = VT2(v1)
173173

174+
# No-op conversion to same type without parameters
175+
@test convert(VT, v1) === v1
176+
174177
@test typeof(v2) == VT2{N, ET}
175178
@test length(v2) == N
176179
@test eltype(v2) == ET

0 commit comments

Comments
 (0)