forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subtype: avoid false alarm caused by eager
forall_exists_subtype
. (J…
…uliaLang#48441) * Avoid earsing `Runion` within nested `forall_exists_subtype` If `Runion.more != 0` we‘d better not erase the local `Runion` as we need it if the subtyping fails after. This commit replaces `forall_exists_subtype` with a local version. It first tries `forall_exists_subtype` and estimates the "problem scale". If subtyping fails and the scale looks small then it switches to the slow path. TODO: At present, the "problem scale" only counts the number of checked `Lunion`s. But perhaps we need a more accurate result (e.g. sum of `Runion.depth`) * Change the reversed subtyping into a local check. Make sure we don't forget the bound in `env`. (And we can fuse `local_forall_exists_subtype`) * Optimization for non-union invariant parameter.
- Loading branch information
Showing
2 changed files
with
91 additions
and
41 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