Skip to content

[GSB] Start inferring same-type requirements from inherited type declarations #9064

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

Conversation

DougGregor
Copy link
Member

Infer same-type requirements among same-named associated
types/typealiases within inherited protocols. This is more staging; it
doesn't really have teeth until we stop wiring together these types as
part of lookup.

…arations.

Infer same-type requirements among same-named associated
types/typealiases within inherited protocols. This is more staging; it
doesn't really have teeth until we stop wiring together these types as
part of lookup.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

typealias->getUnderlyingTypeLoc().setInvalidType(Context);
}

typealias->setUnderlyingType(
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if it does have a generic parameter list? How is this different from the typealias case in validateDecl()?

Copy link
Member Author

Choose a reason for hiding this comment

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

We punt on generic typealiases in protocols, which is (sadly) not new. It's different from the typealias case in validateDecl() because it's using the ProtocolRequirementTypeResolver. The fallback is just validateDecl().

@swift-ci swift-ci merged commit b2d71ec into swiftlang:master Apr 27, 2017
@DougGregor DougGregor deleted the typealias-infer-same-type-requirements branch April 27, 2017 16:43
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.

3 participants