From 8a3a4c70d62f0dcd7a752300e0b4d20201481d63 Mon Sep 17 00:00:00 2001 From: kalmar Date: Tue, 11 Jul 2017 18:28:30 +0200 Subject: [PATCH] critical fix: if g was not in basis setindex! failed silently --- src/GroupRings.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index b863695..2487e3c 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -180,9 +180,8 @@ function setindex!(X::GroupRingElem, value, g::GroupElem) typeof(g) == elem_type(RG.group) || throw("$g is not an element of $(RG.group)") if !(g in keys(RG.basis_dict)) g = (RG.group)(g) - else - X.coeffs[RG.basis_dict[g]] = value end + X.coeffs[RG.basis_dict[g]] = value end eltype(X::GroupRingElem) = eltype(X.coeffs)