diff --git a/src/GrpAb/GrpAbFinGen.jl b/src/GrpAb/GrpAbFinGen.jl index 9d468a5a65..7a877a42c9 100644 --- a/src/GrpAb/GrpAbFinGen.jl +++ b/src/GrpAb/GrpAbFinGen.jl @@ -1146,7 +1146,7 @@ function _sub_integer_snf(G::GrpAbFinGen, n::ZZRingElem, add_to_lattice::Bool = ind += 1 end if ind == ngens(G) && gcd(n, G.snf[ind]) == G.snf[ind] - Gnew = GrpAbFinGenElem(Int[]) + Gnew = GrpAbFinGen(Int[]) mp = hom(Gnew, G, GrpAbFinGenElem[]) if add_to_lattice append!(L, mp) diff --git a/src/Misc/Integer.jl b/src/Misc/Integer.jl index b4c9bc5dd4..02c88f6411 100644 --- a/src/Misc/Integer.jl +++ b/src/Misc/Integer.jl @@ -274,8 +274,8 @@ function ecm(a::ZZRingElem, B1::Int, B2::Int, ncrv::Int, rnd=flint_rand_ctx) end #data from http://www.mersennewiki.org/index.php/Elliptic_Curve_Method -B1 = [2, 11, 50, 250, 1000, 3000, 11000, 43000, 110000, 260000, 850000, 2900000]; -nC = [25, 90, 300, 700, 1800, 5100, 10600, 19300, 49000, 124000, 210000, 340000]; +const B1 = [2, 11, 50, 250, 1000, 3000, 11000, 43000, 110000, 260000, 850000, 2900000]; +const nC = [25, 90, 300, 700, 1800, 5100, 10600, 19300, 49000, 124000, 210000, 340000]; function ecm(a::ZZRingElem, max_digits::Int=div(ndigits(a), 3), rnd=flint_rand_ctx) n = ndigits(a, 10) @@ -532,7 +532,7 @@ function Base.iterate(D::Divisors{T}, i) where {T} if x === nothing return x end - return D.f(x[1]), x[2] + return D.f(x[1])::T, x[2] end function Base.show(io::IO, D::Divisors) diff --git a/src/QuadForm/Quad/NormalForm.jl b/src/QuadForm/Quad/NormalForm.jl index bea322e5f5..98f7bae724 100644 --- a/src/QuadForm/Quad/NormalForm.jl +++ b/src/QuadForm/Quad/NormalForm.jl @@ -836,9 +836,10 @@ function _min_nonsquare(p) Rx, x = polynomial_ring(GF(p, cached = false), "x", cached = false) for i in 1:p if length(factor(x^2 - i)) == 1 - return i + return Int(i) end end + error("this can't be reached") end function _issquare(d::Nemo.ZZModRingElem, p::ZZRingElem)