-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around type intersection bug in
_isequal
, _isless
, __inc
, …
…and `__dec` The underlying intersection bug looks like ``` julia> typeintersect(Tuple{Tuple{Any, Vararg{Any, N}}, Tuple{Any, Vararg{Any, N}}} where N, Tuple{Tuple{Int,Int,Int}, Tuple}) Tuple{Tuple{Int64, Int64, Int64}, NTuple{4, Any}} ``` It leads to the argument types of the functions with signatures of this type to be inferred wrongly, not actually matching the signature, which easily leads to problems down the road. For the four methods touched here, the fact that the two tuple arguments must have the same length is not actually relevant for dispatch as they are internal functions which are only called if this actually holds. Also, this change will just replace the method error with another error if, for some reason, these fuction would get called for tuples of unequal length.
- Loading branch information
1 parent
7b76c7e
commit debe0ae
Showing
3 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters