[test] silgen test coverage for async thunks of non-async funcs #62984
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.
In light of SE-338, you'd think all functions converted to be
async
would have hops in their reabstraction thunks.But that's not the case. A non-async function that is not otherwise isolated according to its type, when converted to become an async function, should not have hops in its reabstraction thunk; not even to the generic executor.
That was not intuitive for me, so I thought I'd add extra test coverage to ensure we maintain that existing behavior, since we rely on it when non-async functions have their isolation casted away when in an isolated context (only allowed when it's not also Sendable). Thus, when it's called later on, it needs to inherit the executor, as its guaranteed to only be called while on a matching one. For example: