-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Normalize (simplify) UnionAll
s when used as type parameter
#36211
Merged
Conversation
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
JeffBezanson
force-pushed
the
mh/normalize_unionalls
branch
from
March 29, 2021 20:05
03cb85e
to
b0c1904
Compare
I updated and rebased this. I think we should probably merge it, since it fixes some crashes. Seems to be a strict improvement. |
JeffBezanson
force-pushed
the
mh/normalize_unionalls
branch
from
March 31, 2021 20:36
b0c1904
to
ccc3c2a
Compare
JeffBezanson
force-pushed
the
mh/normalize_unionalls
branch
from
April 1, 2021 20:25
ccc3c2a
to
5651929
Compare
JeffBezanson
changed the title
RFC: Normalize (simplify)
Normalize (simplify) Apr 6, 2021
UnionAll
s when used as type parameterUnionAll
s when used as type parameter
@JeffBezanson, this needs a manual backport to #40209 |
Thanks for shepherding this along Jeff, and for having an eye on the backport Kristoffer! :) |
JeffBezanson
pushed a commit
that referenced
this pull request
Apr 14, 2021
(cherry picked from commit fedefe9)
ElOceanografo
pushed a commit
to ElOceanografo/julia
that referenced
this pull request
May 4, 2021
antoine-levitt
pushed a commit
to antoine-levitt/julia
that referenced
this pull request
May 9, 2021
johanmon
pushed a commit
to johanmon/julia
that referenced
this pull request
Jul 5, 2021
vtjnash
added a commit
that referenced
this pull request
Aug 23, 2021
KristofferC
pushed a commit
that referenced
this pull request
Aug 27, 2021
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Feb 22, 2022
Need to compute `cacheable` after normalization, since the purpose of the normalization was to turn these into normal cacheable objects, when applicable. Brokenness exposed by JuliaLang#36211 Fixes JuliaLang#41503
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Mar 8, 2022
Need to compute `cacheable` after normalization, since the purpose of the normalization was to turn these into normal cacheable objects, when applicable. Brokenness exposed by JuliaLang#36211 Fixes JuliaLang#41503
staticfloat
pushed a commit
that referenced
this pull request
Dec 23, 2022
(cherry picked from commit fedefe9)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A stab at #35130 although I'm not totally convinced this is a good idea, see #35130 (comment).
This normalizes
UnionAll
s (andUnion
s thereof) when they are used as type parameters. Normalization here means that the typevar is replaced with its upper bound if it does not appear in invariant position and is not subject to the diagonal rule (or in the trivial case where lower and upper bound are identical). Parameters toType
are excluded from this normalization to prevent the change in dispatch also mentioned in #35130 (comment). This is sufficient to cover the cases from #35130:This mostly also makes the tests from #34272 pass (except for where the
Type
exclusion is relevant), but I'm not convinced there aren't other cases where type-equal concrete types are not normalized to identical types, so #34272 might still be necessary in all its glory.Closes #35130.