mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-11-11 12:35:27 +01:00
safer coercion of GroupRingElem to GroupRing
This commit is contained in:
parent
0972cd1fdc
commit
7ba59d6508
@ -131,7 +131,10 @@ function (RG::GroupRing)(x::AbstractVector)
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
(RG::GroupRing)(X::GroupRingElem) = RG(X.coeffs)
|
function (RG::GroupRing)(X::GroupRingElem)
|
||||||
|
RG == parent(X) || throw("Can not coerce!")
|
||||||
|
return RG(X.coeffs)
|
||||||
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user