Propagate function subtype conversion information down to closure emission #71833
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Teach SILGen to try to peephole a function conversion into the emission of a closure expression, then don't actually do it. The long term plan is to actually do this, which should just be a matter of taking some of the code out of reabstraction thunk emission and using it in prolog/epilog/return emission. In the short term, the goal is just to get the conversion information down to the closure emitter so that we can see that we're erasing into an
@isolated(any)
type and then actually erase the closure's isolation properly instead of relying on type-based erasure, which can't handle parameter/capture isolation correctly.Includes the commit from #71832 so that CI might succeed.