Skip to content

Small generics cleanups #4758

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 8 commits into from
Sep 14, 2016

Conversation

slavapestov
Copy link
Contributor

No description provided.

When applying substitutions to substitution lists in SIL, we would
unpack the ArrayRef<Substitution> into a SubstitutionMap on each
iteration over the original ArrayRef<Substitution>. Discourage
this sort of thing by removing the API in question and refactoring
surrounding code.
Don't look at the source locations, because they're fake; just
make the generic parameter `Self` visible inside the body of the
protocol instead.
Not quite ready to define extensions that make generic parameters
concrete, but close.
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@@ -1439,6 +1439,13 @@ SourceRange ASTScope::getSourceRangeImpl() const {
return cast<NominalTypeDecl>(iterableDeclContext)->getBraces();

case ASTScopeKind::GenericParams:
// A protocol's generic parameter list is not written in source, and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, thanks!

@slavapestov slavapestov merged commit 888a32b into swiftlang:master Sep 14, 2016
@slavapestov slavapestov deleted the small-generics-cleanups branch September 16, 2016 08:37
aaditya-chandrasekhar pushed a commit to val-verde/swift that referenced this pull request Sep 30, 2022
[pull] swiftwasm-release/5.7 from release/5.7
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 this pull request may close these issues.

2 participants