Skip to content

[BuilderTransform] Type-check buildBlock of each condition body separately from "join" operation #79617

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

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 25, 2025

The result builder transform proposal (SE-0289) states that buildBlock is always
type-checked separately and buildEither and buildOptional no effect on its inference.

There was a problem with previous implementation that allowed buildBlock to be
type-checked together with buildOptional in some circumstances. We'd like to
rectify this now and finally align the implement with the semantics stated by the proposal.

Resolves: rdar://141473488

…before using in `buildEither`

Fixes implementation issue where build block is type-checked as part
of `buildEither(...)`. This is incorrect according to the original
proposal (SE-0289), `buildBlock` should be type-checked independently
and `buildEither` should have no effect on what overload of `buildBlock`
gets selected.
…fore using in `buildEither`

Similar to `case` statements, if chain is non-optional, let's
isolate `buildBlock` of every branch into a separate type variable.
@xedin
Copy link
Contributor Author

xedin commented Feb 25, 2025

@swift-ci please test

@xedin xedin merged commit 51c833f into swiftlang:main Feb 28, 2025
5 checks passed
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