From 992a4a2d8f83e7b7a4c893a98cdde32664bf14f0 Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Tue, 24 Oct 2017 11:47:51 -0400 Subject: [PATCH] remove a broken convert() method and test that it was unnecessary --- src/FixedSizeArrays.jl | 1 - test/fixed_size_arrays.jl | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FixedSizeArrays.jl b/src/FixedSizeArrays.jl index 1d921f47..b3a99cad 100644 --- a/src/FixedSizeArrays.jl +++ b/src/FixedSizeArrays.jl @@ -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 diff --git a/test/fixed_size_arrays.jl b/test/fixed_size_arrays.jl index 29c7dca4..ef8c9a61 100644 --- a/test/fixed_size_arrays.jl +++ b/test/fixed_size_arrays.jl @@ -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