diff --git a/Project.toml b/Project.toml index c30117491..47eb54eb1 100644 --- a/Project.toml +++ b/Project.toml @@ -19,7 +19,7 @@ SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] -AbstractAlgebra = "^0.28" +AbstractAlgebra = "^0.27.3, ^0.28" Antic_jll = "~0.201.500" Arb_jll = "~200.2300.000" Calcium_jll = "~0.401.100" diff --git a/src/flint/fmpz_mod_poly.jl b/src/flint/fmpz_mod_poly.jl index 22f919115..7856ec07e 100644 --- a/src/flint/fmpz_mod_poly.jl +++ b/src/flint/fmpz_mod_poly.jl @@ -24,7 +24,8 @@ elem_type(::Type{ZZModPolyRing}) = ZZModPolyRingElem parent_type(::Type{ZZModPolyRingElem}) = ZZModPolyRing -dense_poly_type(::Type{Generic.ResidueRingElem{ZZRingElem}}) = ZZModPolyRingElem +# FIXME/TODO: change Res to ResidueRingElem once we require AbstractAlgebra >= 0.28.x +dense_poly_type(::Type{Generic.Res{ZZRingElem}}) = ZZModPolyRingElem function check_parent(x::T, y::T) where {T <: Zmodn_fmpz_poly} parent(x) != parent(y) && error("Parents must coincide") diff --git a/src/flint/gfp_fmpz_poly.jl b/src/flint/gfp_fmpz_poly.jl index 7dd9d7e51..8b04edc2a 100644 --- a/src/flint/gfp_fmpz_poly.jl +++ b/src/flint/gfp_fmpz_poly.jl @@ -24,7 +24,8 @@ elem_type(::Type{FpPolyRing}) = FpPolyRingElem parent_type(::Type{FpPolyRingElem}) = FpPolyRing -dense_poly_type(::Type{Generic.ResidueFieldElem{ZZRingElem}}) = FpPolyRingElem +# FIXME/TODO: change ResF to ResidueFieldElem once we require AbstractAlgebra >= 0.28.x +dense_poly_type(::Type{Generic.ResF{ZZRingElem}}) = FpPolyRingElem characteristic(R::FpPolyRing) = characteristic(base_ring(R)) diff --git a/test/flint/fmpz_mod_poly-test.jl b/test/flint/fmpz_mod_poly-test.jl index 8ba1f9ab8..b5d6d9d4c 100644 --- a/test/flint/fmpz_mod_poly-test.jl +++ b/test/flint/fmpz_mod_poly-test.jl @@ -12,7 +12,8 @@ @test elem_type(S) == ZZModPolyRingElem @test elem_type(ZZModPolyRing) == ZZModPolyRingElem @test parent_type(ZZModPolyRingElem) == ZZModPolyRing - @test dense_poly_type(Generic.ResidueRingElem{ZZRingElem}) == ZZModPolyRingElem + # FIXME/TODO: change Res to ResidueRingElem once we require AbstractAlgebra >= 0.28.x + @test dense_poly_type(Generic.Res{ZZRingElem}) == ZZModPolyRingElem @test typeof(S) <: ZZModPolyRing