diff --git a/src/GrpAb/Elem.jl b/src/GrpAb/Elem.jl index ec0d97fe54..402921cc2e 100644 --- a/src/GrpAb/Elem.jl +++ b/src/GrpAb/Elem.jl @@ -44,16 +44,6 @@ end # ################################################################################ -# This destroy's the input. If you don't want this, use A(::ZZMatrix) - -function FinGenAbGroupElem(A::FinGenAbGroup, a::ZZMatrix) - assure_reduced!(A, a) - z = FinGenAbGroupElem() - z.parent = A - z.coeff = a - return z -end - function reduce_mod_snf!(a::ZZMatrix, v::Vector{ZZRingElem}) GC.@preserve a begin for i = 1:length(v) diff --git a/src/HeckeTypes.jl b/src/HeckeTypes.jl index c0446ff4c9..36c2dec7fa 100644 --- a/src/HeckeTypes.jl +++ b/src/HeckeTypes.jl @@ -1828,11 +1828,16 @@ abstract type GrpAbElem <: AbstractAlgebra.AdditiveGroupElem end end -mutable struct FinGenAbGroupElem <: GrpAbElem +struct FinGenAbGroupElem <: GrpAbElem parent::FinGenAbGroup coeff::ZZMatrix - FinGenAbGroupElem() = new() + # This destroy's the input. If you don't want this, use A(::ZZMatrix) + function FinGenAbGroupElem(A::FinGenAbGroup, a::ZZMatrix) + assure_reduced!(A, a) + return new(A, a) + end + end ################################################################################