1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-07-31 14:25:29 +02:00

preserve type of coerced element

This commit is contained in:
kalmar 2017-07-12 20:54:20 +02:00
parent ee3b4e0761
commit fc3cbeb14c

View File

@ -152,6 +152,8 @@ end
function (RG::GroupRing)(X::GroupRingElem, emb::Function) function (RG::GroupRing)(X::GroupRingElem, emb::Function)
result = RG(eltype(X.coeffs)) result = RG(eltype(X.coeffs))
T = typeof(X.coeffs)
result.coeffs = T(result.coeffs)
for g in parent(X).basis for g in parent(X).basis
result[emb(g)] = X[g] result[emb(g)] = X[g]
end end