Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to deprecations introduced in AA #1451

Merged
merged 4 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ GAPExt = "GAP"
PolymakeExt = "Polymake"

[compat]
AbstractAlgebra = "^0.40.5"
AbstractAlgebra = "^0.40.9"
Dates = "1.6"
Distributed = "1.6"
GAP = "0.9.6, 0.10, 0.11"
Expand Down
10 changes: 5 additions & 5 deletions src/NumField/NfAbs/NfAbs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -921,9 +921,9 @@ end
#
################################################################################

function force_coerce(a::NumField{T}, b::NumFieldElem, throw_error::Type{Val{S}} = Val{true}) where {T, S}
function force_coerce(a::NumField{T}, b::NumFieldElem, ::Val{throw_error} = Val(true)) where {T, throw_error}
if Nemo.is_cyclo_type(a) && Nemo.is_cyclo_type(parent(b))
return force_coerce_cyclo(a, b, throw_error)::elem_type(a)
return force_coerce_cyclo(a, b, Val{throw_error})::elem_type(a)
end
if absolute_degree(parent(b)) <= absolute_degree(a)
c = find_one_chain(parent(b), a)
Expand All @@ -936,7 +936,7 @@ function force_coerce(a::NumField{T}, b::NumFieldElem, throw_error::Type{Val{S}}
return x::elem_type(a)
end
end
if throw_error === Val{true}
if throw_error
error("no coercion possible")
else
return false
Expand Down Expand Up @@ -1163,12 +1163,12 @@ function common_super(a::NumFieldElem, b::NumFieldElem)
end

#tries to find a common parent for all "a" and then calls op on it.
function force_op(op::T, throw_error::Type{Val{S}}, a::NumFieldElem...) where {T <: Function, S}
function force_op(op::Function, ::Val{throw_error}, a::NumFieldElem...) where {throw_error}
C = parent(a[1])
for b = a
C = common_super(parent(b), C)
if C === nothing
if throw_error === Val{true}
if throw_error
error("no common parent known")
else
return nothing
Expand Down
Loading