From 505295aa5adb1a34c9692559a9da97b4c257d78b Mon Sep 17 00:00:00 2001 From: kalmarek Date: Thu, 14 Sep 2017 17:32:31 +0200 Subject: [PATCH] convert directly the elements of X.coeffs --- src/GroupRings.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index 214c316..8cfeb95 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -86,8 +86,8 @@ import Base.promote_rule promote_rule(::Type{GroupRingElem{T}}, ::Type{GroupRingElem{S}}) where {T,S} = GroupRingElem{promote_type(T,S)} -function convert(::Type{T}, X::GroupRingElem) where {T} - return GroupRingElem(convert(AbstractVector{T}, X.coeffs), parent(X)) +function convert(::Type{T}, X::GroupRingElem) where {T<:Number} + return GroupRingElem(T.(X.coeffs), parent(X)) end ###############################################################################