Skip to content

Conversation

AnthonyLatsis
Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis commented Oct 7, 2025

The flow was such that we recorded subtype constraints regardless of the subject type's nature. Extract value generics handling out of the devious else if chain, and never record any subtype constraints if the subject type is a non-type parameter.

While we're here, generalize the diagnostic message for user-written subtype constraints on value generic parameters and emit it consistently, not just if the right-hand side contains a protocol type.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

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

Thanks!

…nitions properly

The flow was such that we recorded subtype constraints regardless of the
subject type's nature. Extract value generics handling out of the
devious `else if` chain, and never record any subtype constraints if the
subject type is a non-type parameter.

While we're here, generalize the diagnostic message for user-written
subtype constraints on value generic parameters and emit it
consistently, not just if the right-hand side contains a protocol type.
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please test Windows

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please test Windows

@AnthonyLatsis AnthonyLatsis merged commit 5373530 into main Oct 8, 2025
3 checks passed
@AnthonyLatsis AnthonyLatsis deleted the jepa-main2 branch October 8, 2025 20:12
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