Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integer /: restrict fallback to same-type case (fix #19714)
The principle here is that if there's an implementation of a promoted operator for some type and promotions for that type, unless other methods are defined, the operation should always be "funnelled" through the core operator definition for that type. The method for `/(::Integer, ::Integer)` violated that principle since it would take precedence in mixed-integer-type division cases even in the presence of a same-type method definition for a custom integer type and the appropriate promotion rules.
- Loading branch information
2166ec6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g., in DSP module, fixed-point arithmetics doesn't work:
This operation also will not work in every parametric function run with integers, where T<:Real
2166ec6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sairus7, I can't tell if your comment is relevant or not or if it's even intended for this commit.