Skip to content

Conversation

@slavapestov
Copy link
Contributor

It is no longer true that the existential signature of any P is
always just <Self where Self: P>, because P might be ~Copyable,
in which case any P is really any P & Copyable.

Just remove the micro-optimization here, because if we're building
an existential signature, we're likely going to be doing generic
signature queries, and then we'll need a Requirement Machine anyway.

This happened to manifest in the SIL optimizer when performing the
concrete existential peephole with any Sendable, since Sendable is
now ~Copyable.

Fixes rdar://problem/126079282.

…ialSignature()

It is no longer true that the existential signature of `any P` is
always just `<Self where Self: P>`, because `P` might be `~Copyable`,
in which case `any P` is really `any P & Copyable`.

Just remove the micro-optimization here, because if we're building
an existential signature, we're likely going to be doing generic
signature queries, and then we'll need a Requirement Machine anyway.

This happened to manifest in the SIL optimizer when performing the
concrete existential peephole with `any Sendable`, since Sendable is
now ~Copyable.

Fixes rdar://problem/126079282.
@slavapestov slavapestov requested review from hborla and xedin as code owners April 9, 2024 02:47
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

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