Skip to content

Parameterized protocol improvements #59179

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

slavapestov
Copy link
Contributor

Fixes rdar://problem/92197412 and a couple of other minor issues.

…ypes

For now, this only works with conformance requirements and not
existential types.

Fixes rdar://problem/92197412.
…ing type of a typealias

Just as with an unconstrained protocol type appearing here, such a typealias
can only be used on the right hand side of a conformance requirement, or as
the base of an 'any' type.
@slavapestov slavapestov force-pushed the parameterized-protocol-improvements branch from 4121d45 to bf00a71 Compare May 31, 2022 18:38
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit b9e8e2c into swiftlang:main May 31, 2022
}

/// Not supported as a protocol composition term for now
struct TestStructComposition : Sequence<Int> & Sendable {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this expected error? According to SE-0346, this is an acceptable syntax.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We haven't yet implemented support for parameterized protocol types appearing in a concrete type's inheritance clause.

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