-
-
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.
Expend more
Vararg
elements during re-intersection if valid.
This should be valid if the type var is used only for `Vararg` length. This commit add a new field `max_offset` to our type env. which is used to tracks the minimum length of a `Vararg` during the 1st round intersection. (It's value would be set to `-1` if this var has other usage.) If we got a positive value, then we can expand more elements during the 2nd round intersection safely. With these extra elements, the offset between 2 `Vararg`s will reduce to 0 (hopefully), and thus we get a more accurate result.
- Loading branch information
Showing
2 changed files
with
110 additions
and
60 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