Skip to content

Ncgenerics test fixes kavon v4 #71438

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 4 commits into from
Feb 8, 2024

Conversation

kavon
Copy link
Member

@kavon kavon commented Feb 7, 2024

more fixes for tests that fail under NoncopyableGenerics

@kavon kavon force-pushed the ncgenerics-test-fixes-kavon-v4 branch from 883745b to 89d3bff Compare February 7, 2024 07:17
@kavon
Copy link
Member Author

kavon commented Feb 7, 2024

@swift-ci please test

@kavon kavon enabled auto-merge February 7, 2024 07:18
@kavon kavon disabled auto-merge February 7, 2024 07:24
@kavon kavon force-pushed the ncgenerics-test-fixes-kavon-v4 branch from 89d3bff to d22b98b Compare February 7, 2024 07:37
@kavon
Copy link
Member Author

kavon commented Feb 7, 2024

@swift-ci please test

@kavon
Copy link
Member Author

kavon commented Feb 7, 2024

@swift-ci smoke test

kavon added 4 commits February 7, 2024 11:05
While certain kinds of enums synthesize Equatable, Hashable, and
RawRepresentable conformances, we can't yet permit noncopyable types to
synthesize those until we upgrade those protocols themselves to not
require `Copyable` conformers. For example, Equatable needs to be
changed in the stdlib to be `protocol Equatable: ~Copyable`, etc.

I'm deferring upgrade work until a bit later.
There's no good reason to permit them. Conformances like Copyable and
Sendable are pervasive, so it's as though we are permitting extensions
of `Any`. Until there's a good argument in favor of such extensions,
remove the capability now.
Functions can in fact conform to some protocols, notably,
marker protocols. Dynamically they have no influence on whether the cast
will succeed or not, as there is no way to tell if a type conforms to
such a protocol at runtime. But we should check them statically because
they otherwise can be cast to Any eventually.
@kavon kavon force-pushed the ncgenerics-test-fixes-kavon-v4 branch from d22b98b to 3dda59f Compare February 7, 2024 23:11
@kavon kavon requested a review from ktoso as a code owner February 7, 2024 23:11
@kavon
Copy link
Member Author

kavon commented Feb 7, 2024

@swift-ci smoke test

@kavon kavon merged commit aaf2f7e into swiftlang:main Feb 8, 2024
@kavon kavon deleted the ncgenerics-test-fixes-kavon-v4 branch February 8, 2024 03:28
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.

1 participant