You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite bad, but the fix should be straightforward, while possibly somewhat breaking for dependents:
Introduce a new function with the same name, parent, but owned by AbstractAlgebra, or by one of its submodules.
Then dependents may need to do using AbstractAlgebra: parent to disambiguate between Base.parent and AbstractAlgebra.parent.
It might also make sense to introduce a public alias for AbstractAlgebra.parent with a different name, to help dependents with name clashes. For example, AbstractAlgebra.parent_abstractalgebra.
parentis a function defined inBase.AbstractAlgebra reuses the same function,
parent, with completely different semantics. This is a bug and is known as type punning.This approach also leads to type piracy, xref issue Type piracy in AbstractAlgebra #1387.
This is quite bad, but the fix should be straightforward, while possibly somewhat breaking for dependents:
Introduce a new function with the same name,
parent, but owned byAbstractAlgebra, or by one of its submodules.Then dependents may need to do
using AbstractAlgebra: parentto disambiguate betweenBase.parentandAbstractAlgebra.parent.It might also make sense to introduce a public alias for
AbstractAlgebra.parentwith a different name, to help dependents with name clashes. For example,AbstractAlgebra.parent_abstractalgebra.