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

isdispatchtuple inconsistency for typeof(Union{}) #45347

Closed
Keno opened this issue May 18, 2022 · 0 comments · Fixed by #45348
Closed

isdispatchtuple inconsistency for typeof(Union{}) #45347

Keno opened this issue May 18, 2022 · 0 comments · Fixed by #45348

Comments

@Keno
Copy link
Member

Keno commented May 18, 2022

julia> A = Tuple{typeof(identity), Type{Union{}}}
Tuple{typeof(identity), Type{Union{}}}

julia> B = Tuple{typeof(identity), typeof(Union{})}
Tuple{typeof(identity), Core.TypeofBottom}

julia> A == B
true

julia> Base.isdispatchtuple(A)
true

julia> Base.isdispatchtuple(B)
false

This was the root cause of one of the PkgEval failures in #45272.

Keno added a commit that referenced this issue May 18, 2022
We have `typeof(Union{}) == Type{Union{}}`, but were treating them
differently in the calculation of `isdispatchtuple`. The compiler
expects `isdispatchtuple` to commute with type equality in various
places, so try to make this consistent.

Fixes #45347
Keno added a commit that referenced this issue May 22, 2022
We have `typeof(Union{}) == Type{Union{}}`, but were treating them
differently in the calculation of `isdispatchtuple`. The compiler
expects `isdispatchtuple` to commute with type equality in various
places, so try to make this consistent.

Fixes #45347
pchintalapudi pushed a commit that referenced this issue May 25, 2022
We have `typeof(Union{}) == Type{Union{}}`, but were treating them
differently in the calculation of `isdispatchtuple`. The compiler
expects `isdispatchtuple` to commute with type equality in various
places, so try to make this consistent.

Fixes #45347
KristofferC pushed a commit that referenced this issue May 28, 2022
We have `typeof(Union{}) == Type{Union{}}`, but were treating them
differently in the calculation of `isdispatchtuple`. The compiler
expects `isdispatchtuple` to commute with type equality in various
places, so try to make this consistent.

Fixes #45347

(cherry picked from commit a37dd16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant