From 76e933313c69c507404f0d81473fc1e762fa802d Mon Sep 17 00:00:00 2001 From: kalmarek Date: Thu, 21 Feb 2019 15:03:32 +0100 Subject: [PATCH] fix one(GroupRing{<:MatSpace}) --- src/GroupRings.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index 90a4743..71e115f 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -113,7 +113,7 @@ end zero(RG::GroupRing, T::Type=Int) = RG(T) one(RG::GroupRing, T::Type=Int) = RG(RG.group(), T) -one(RG::GroupRing{R}, T::Type=Int) where {R<:Ring} = RG(one(RG.group()), T) +one(RG::GroupRing{<:MatSpace}, T::Type=Int) = RG(one(RG.group), T) function (RG::GroupRing)(T::Type=Int) isdefined(RG, :basis) || throw("Can not coerce without basis of GroupRing") @@ -126,9 +126,9 @@ function (RG::GroupRing)(i::Int, T::Type=Int) return elt end -function (RG::GroupRing{R})(i::Int, T::Type=Int) where {R<:Ring} +function (RG::GroupRing{<:MatSpace})(i::Int, T::Type=Int) elt = RG(T) - elt[one(RG.group())] = i + elt[one(RG.group)] = i return elt end