Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sema: SuppressedAssociatedTypesWithDefaults#85704

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kavon wants to merge2 commits intoswiftlang:main
base:main
Choose a base branch
Loading
fromkavon:suppressed-assoc-types-with-defaults

Conversation

@kavon
Copy link
Member

No description provided.

There's about to be a second version that I'd like totest in parallel with the old version.
This is similar to SuppressedAssociatedTypes, but infersdefault requirements when primary associated types ofprotocols are suppressed. This defaulting for the primaryassociated types happens in extensions of the protocol,along with generic parameters, whenever a source-writtenrequirement states a conformance requirement for the protocol.Thus, the current scheme for this defaulting is a simplistic,driven by source-written requirements, rather than factsthat are inferred while building generic signatures.Defaults are not expanded for infinitely many associated types.Other changes include...Sema: adjust protocol extension signature hackWith SuppressedAssociatedTypesWithDefaults,we can have associated types that are missinginvertible conformance requirements, so we needto try re-building the signature for the extensionof the protocol. Otherwise, we won't infer the newdefault(s) for those associated types.This previous hack was only trying to shortcutthe rebuilding if it saw Self is lacking a conformancerequirement. Now it'll check if any inverses were writtenin source for that protocol.
@kavonkavonforce-pushed thesuppressed-assoc-types-with-defaults branch from7a739ba toc486f40CompareNovember 25, 2025 23:15
@kavon
Copy link
MemberAuthor

@swift-ci test

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@hborlahborlaAwaiting requested review from hborlahborla will be requested when the pull request is marked ready for reviewhborla is a code owner

@slavapestovslavapestovAwaiting requested review from slavapestovslavapestov will be requested when the pull request is marked ready for reviewslavapestov is a code owner

@xedinxedinAwaiting requested review from xedinxedin will be requested when the pull request is marked ready for reviewxedin is a code owner

@DougGregorDougGregorAwaiting requested review from DougGregorDougGregor will be requested when the pull request is marked ready for reviewDougGregor is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@kavon

[8]ページ先頭

©2009-2025 Movatter.jp