Skip to content
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

Fix #20271: Bring for comprehension spec up to date. #21702

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Oct 4, 2024

Since Scala 3.4, a withFilter is generated if and only if the generator has the case modifier.

If it does not, the pattern must be irrefutable.


Rendered version of the changed section:
image

@sjrd sjrd requested a review from odersky October 4, 2024 15:33
@sjrd sjrd linked an issue Oct 4, 2024 that may be closed by this pull request
@michelou
Copy link
Contributor

michelou commented Oct 5, 2024

@sjrd Read "produced" instead of "produces" in sentence "[...] tests whether elements produces by ´e´ match [...]".

Since Scala 3.4, a `withFilter` is generated if and only if the
generator has the `case` modifier.

If it does not, the pattern must be irrefutable.
@sjrd sjrd force-pushed the update-for-comprehension-spec branch from 6f610cf to 127bb7b Compare October 5, 2024 10:04
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@odersky odersky merged commit 6ab3e44 into scala:main Nov 4, 2024
28 checks passed
@odersky odersky deleted the update-for-comprehension-spec branch November 4, 2024 14:31
WojciechMazur added a commit that referenced this pull request Nov 8, 2024
…6.2 (#21900)

Backports #21702 to the 3.6.2 branch.

PR submitted by the release tooling.
[skip ci]
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.

Language Spec: add more details about changes in for comprehension
3 participants