-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alternative algorithm for union math (#5255)
Fixes #5243 Fixes #5249 Some comments: * I went ahead with a slow but very simple recursive algorithm that treats all various complex cases correctly. On one hand it can be exponential, but on the other hand, the complexity will be bad _only_ if user abuses lots of unions * I use a hack caused by the fact that currently most function inference functions pass argument _expressions_ instead of types, I left a TODO to use a more unified approach similar to multiassign_from_union * It may look like there are many changes in tests, but actually there are not, the differences are because: - Error messages now show the _first potentially matching_ overload (which is OK I think) - Order of items in many unions turned to the opposite, apparently union `__repr__` is unstable.
- Loading branch information
1 parent
44e789d
commit 0ca6bf9
Showing
3 changed files
with
326 additions
and
109 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
Oops, something went wrong.