Skip to content

[ResultBuilder] AST transform: don't try type erasure of result expressions #60449

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 2 commits into from
Aug 9, 2022

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 8, 2022

  • Fix SyntacticElementSolutionApplication to use existing return expression targets when available;
  • Don't do type erase of result expressions during builder transform, it would be done during constraint generation.

xedin added 2 commits August 8, 2022 13:38
Multi-statement closures and result builder transformed entities
record a target for `return` statement during constraint generation.

Single-statement closure do not but they'd be handled in a special
way.
…ssions

Constraint generation is going to erase when appropriate and rewrite the target,
no need to do that explicitly during result builder transform.
@xedin xedin requested a review from hborla August 8, 2022 20:46
@xedin
Copy link
Contributor Author

xedin commented Aug 8, 2022

@swift-ci please test

@xedin xedin merged commit 2ebc7a2 into swiftlang:main Aug 9, 2022
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