mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 03:40:29 +01:00
try to coerce before throwing error
This commit is contained in:
parent
45fc421da7
commit
27e9ce254f
@ -107,7 +107,6 @@ function (RG::GroupRing)(T::Type=Int)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function (RG::GroupRing)(g::GroupElem, T::Type=Int)
|
function (RG::GroupRing)(g::GroupElem, T::Type=Int)
|
||||||
typeof(g) == elem_type(RG.group) || throw("$g does not belong to $(RG.group), the underlying group of $RG")
|
|
||||||
g = try
|
g = try
|
||||||
RG.group(g)
|
RG.group(g)
|
||||||
catch
|
catch
|
||||||
|
Loading…
Reference in New Issue
Block a user