From 962a9e6e7368597df4639c51982b46adfe0236d3 Mon Sep 17 00:00:00 2001 From: kalmar Date: Tue, 6 Jun 2017 22:25:01 +0200 Subject: [PATCH] Revert "reparametrise parent call overloads" This reverts commit 4b86d5d075c8bd53b77fbd78d85963ef5d51669d. --- src/GroupRings.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index efaef6e..3c79505 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -112,23 +112,23 @@ end # ############################################################################### -function {Gr,T}(RG::GroupRing{Gr,T})(S::Type=Int) +function (RG::GroupRing)(T::Type=Int) isdefined(RG, :basis) || throw("Complete the definition of GroupRing first") - return GroupRingElem(spzeros(S,length(RG.basis)), RG) + return GroupRingElem(spzeros(T,length(RG.basis)), RG) end -function {Gr,T}(RG::GroupRing{Gr,T})(g::GroupElem, S::Type=Int) +function (RG::GroupRing)(g::GroupElem, T::Type=Int) g = try RG.group(g) catch throw("Can't coerce $g to the underlying group of $RG") end - result = RG(S) - result[g] = one(S) + result = RG(T) + result[g] = one(T) return result end -function {Gr,T}(RG::GroupRing{Gr,T})(x::AbstractVector) +function (RG::GroupRing)(x::AbstractVector) length(x) == length(RG.basis) || throw("Can not coerce to $RG: lengths differ") result = RG(eltype(x)) result.coeffs = x