Skip to content

Commit

Permalink
Remove use of AbstractAlgebra.error_dim_negative (#1529)
Browse files Browse the repository at this point in the history
Note that src/error.jl was not even being included.
  • Loading branch information
fingolfin authored Sep 1, 2023
1 parent fd27c97 commit a5e49fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
8 changes: 0 additions & 8 deletions src/error.jl

This file was deleted.

16 changes: 9 additions & 7 deletions src/flint/FlintTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
###############################################################################

const _err_dim_negative = ErrorException("Dimensions must be non-negative")

###############################################################################
#
# ZZRing / ZZRingElem
Expand Down Expand Up @@ -5155,7 +5157,7 @@ struct zzModMatrixSpace <: MatSpace{zzModRingElem}
ncols::Int

function zzModMatrixSpace(R::zzModRing, r::Int, c::Int)
(r < 0 || c < 0) && throw(error_dim_negative)
(r < 0 || c < 0) && throw(_err_dim_negative)
return new(R, r, c)
end
end
Expand Down Expand Up @@ -5327,7 +5329,7 @@ struct ZZModMatrixSpace <: MatSpace{ZZModRingElem}
ncols::Int

function ZZModMatrixSpace(R::ZZModRing, r::Int, c::Int)
(r < 0 || c < 0) && throw(error_dim_negative)
(r < 0 || c < 0) && throw(_err_dim_negative)
return new(R, r, c)
end
end
Expand Down Expand Up @@ -5461,7 +5463,7 @@ struct FpMatrixSpace <: MatSpace{FpFieldElem}
ncols::Int

function FpMatrixSpace(R::FpField, r::Int, c::Int)
(r < 0 || c < 0) && throw(error_dim_negative)
(r < 0 || c < 0) && throw(_err_dim_negative)
return new(R, r, c)
end
end
Expand Down Expand Up @@ -5597,7 +5599,7 @@ struct fpMatrixSpace <: MatSpace{fpFieldElem}
ncols::Int

function fpMatrixSpace(R::fpField, r::Int, c::Int)
(r < 0 || c < 0) && throw(error_dim_negative)
(r < 0 || c < 0) && throw(_err_dim_negative)
return new(R, r, c)
end
end
Expand Down Expand Up @@ -6207,7 +6209,7 @@ struct FqMatrixSpace <: MatSpace{FqFieldElem}
ncols::Int

function FqMatrixSpace(R::FqField, r::Int, c::Int)
(r < 0 || c < 0) && throw(error_dim_negative)
(r < 0 || c < 0) && throw(_err_dim_negative)
return new(R, r, c)
end
end
Expand Down Expand Up @@ -6437,7 +6439,7 @@ struct FqPolyRepMatrixSpace <: MatSpace{FqPolyRepFieldElem}
ncols::Int

function FqPolyRepMatrixSpace(R::FqPolyRepField, r::Int, c::Int)
(r < 0 || c < 0) && throw(error_dim_negative)
(r < 0 || c < 0) && throw(_err_dim_negative)
return new(R, r, c)
end
end
Expand Down Expand Up @@ -6615,7 +6617,7 @@ struct fqPolyRepMatrixSpace <: MatSpace{fqPolyRepFieldElem}
ncols::Int

function fqPolyRepMatrixSpace(R::fqPolyRepField, r::Int, c::Int)
(r < 0 || c < 0) && throw(error_dim_negative)
(r < 0 || c < 0) && throw(_err_dim_negative)
return new(R, r, c)
end
end
Expand Down

0 comments on commit a5e49fc

Please sign in to comment.