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

make Tuple{Union{}} unconstructable #49111

Merged
merged 1 commit into from
Apr 10, 2023
Merged

make Tuple{Union{}} unconstructable #49111

merged 1 commit into from
Apr 10, 2023

Commits on Apr 9, 2023

  1. make Tuple{Union{}} unconstructable

    Type intersection assumed it was equal to Union{}, so this makes it
    unconstructable so that holds true. This is similar to what the
    NamedTuple constructor does.
    
    Secondarily, this fixes an inference bug where it would create
    Vararg{Union{}} and then incorrectly handle that fieldtype.
    
    - Fixes #32392
    - Addresses part of the concerns discussed in
      #24614 (comment)
    - Addresses part of the issues presented in
      #26175
    - May allow improving jl_type_equality_is_identity
      (https://github.com/JuliaLang/julia/pull/49017/files#diff-882927c6e612596e22406ae0d06adcee88a9ec05e8b61ad81b48942e2cb266e9R986)
    - May allow improving intersection (finish_unionall can be more
      aggressive at computing varval for any typevars that appears in
      covariant position and has lb=Union{} and ub=leaf type)
    vtjnash committed Apr 9, 2023
    Configuration menu
    Copy the full SHA
    8950caf View commit details
    Browse the repository at this point in the history