-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SE-0335] Enable explicit existential types. #40666
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
cf44889
[ClangImporter] When importing ObjC pointer types, wrap protocol
hborla f368b77
[Sema] Account for ExistentialType in lookupExistentialConformance.
hborla 02f5e47
[Sema] Resolve @_implements protocols using the generic requirement
hborla efeb709
[Deserialization] Fix deserialization of explicit existential types.
hborla 6cee193
[Type System] When explicit existential types are enabled, wrap Error
hborla a7fa469
[GenericSignature] Don't allow conformance requirements with explicit
hborla f6f53f6
[Codable] When explicit existential types are enabled, synthesize Cod…
hborla 86730ca
[Interop] Handle existential types in ClangTypeConverter and
hborla 1d56338
[SILOptimizer] Use the constraint type in ExistentialSpecializer when
hborla f7a82ac
[Type Reconstruction] For now, reconstruct existential types without
hborla 5e4fbc4
[Diagnostics] Stage in the new error message for existential types that
hborla 733648b
[Sema] When explicit existential types are enabled, type witnesses that
hborla d971d48
[Type System] With explicit existential types, make sure existential
hborla b7c6348
[Sema] Implement type join for existential types.
hborla 5dced8e
[ConstraintSystem] Fix a few constraint system corner cases with expl…
hborla f018328
[TypeResolver] Fix a few corner cases in type resolution for explicit
hborla 6e6ca13
[Type System] Use the constraint type of an existential type in
hborla 3021071
[ASTPrinter] Add an option that controls whether existential types
hborla ee331a8
[Type System] Enable explicit existential types.
hborla 6060de6
[AST] Teach ExistentialType::get to only produce ExistentialType when
hborla c48b593
[Diagnostics] Remove the warning for 'any Any' and 'any AnyObject'.
hborla 992a871
[Type Reconstruction] Re-construct existential types with Existential…
hborla 6608bf8
[Sema] Fix the source compatibility check for member operators with
hborla 626bea2
[ConstraintSystem] Return an existential type in getTypeOfMemberRefer…
hborla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the existence of this method, but it messes up
TypeWalker
if I makeAnyMetatypeType::getInstanceType()
returnExistentialType
for existential metatypes. Alternatively, I could addgetRawInstanceType()
or something like that for the few places that actually need the storedInstanceType
. Really, I'd like to just replaceExistentialMetatypeType
withExistentialType(MetatypeType(...))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your longer-term goal of removing ExistentialMetatypeType is good and in the meantime, this workaround is reasonable.