Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand more Vararg elements during re-intersection if valid. #46604

Merged
merged 1 commit into from
Dec 14, 2023

Commits on Dec 13, 2023

  1. 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.
    N5N3 committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    a80fc02 View commit details
    Browse the repository at this point in the history