diff --git a/src/LocalField/Elem.jl b/src/LocalField/Elem.jl index 798a89abcb..7d7c54720f 100644 --- a/src/LocalField/Elem.jl +++ b/src/LocalField/Elem.jl @@ -693,7 +693,9 @@ function Base.:(^)(a::LocalFieldElem, n::Int) e = absolute_ramification_index(parent(a)) v = valuation(n, prime(parent(a))) if v > 0 - b = setprecision(a.data, precision(a.data)+v) + b = setprecision(base_ring(a.data), precision(a.data)+v) do + setprecision(a.data, precision(a.data)+v) + end else b = a.data end diff --git a/src/LocalField/Types.jl b/src/LocalField/Types.jl index 9bc7d49586..9eb1d5f909 100644 --- a/src/LocalField/Types.jl +++ b/src/LocalField/Types.jl @@ -3,7 +3,7 @@ abstract type EisensteinLocalField <: LocalFieldParameter end abstract type UnramifiedLocalField <: LocalFieldParameter end abstract type GenericLocalField <: LocalFieldParameter end -mutable struct LocalField{S, T} <: NonArchLocalField +@attributes mutable struct LocalField{S, T} <: NonArchLocalField def_poly::Function #Int -> Poly at prec n def_poly_cache::Dict{Int, Generic.Poly{S}} S::Symbol