Skip to content

Update union-types.md #17208

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 1 commit into from
Apr 12, 2023
Merged

Conversation

liang3zy22
Copy link
Contributor

This should be an error, "A union type A | B has as values all values". So update it.

@liang3zy22
Copy link
Contributor Author

Strange. I clicked "Edit this page on github" then create this PR. But the branch is lampepfl:language-reference-stable. I think it should be lampepfl:main.

@SethTisue
Copy link
Member

SethTisue commented Apr 5, 2023

The original wording is correct, and it is also more idiomatic than the suggested replacement.

If you find it reads poorly, perhaps we could take some other tack entirely. Maybe:

A union type A | B includes all values of both types.

@liang3zy22
Copy link
Contributor Author

Thanks, @SethTisue .

The original wording is correct, and it is also more idiomatic than the suggested replacement.

If you find it reads poorly, perhaps we could take some other tack entirely.

To me(maybe other people), it does reads poorly.

A union type A | B includes all values of both types.

I will update the patch as you suggested.

@liang3zy22 liang3zy22 force-pushed the patch-1 branch 2 times, most recently from ddd477c to 3910b3d Compare April 6, 2023 00:03
Update union-types.md to improve readability.
Update lazy-vals-init.md to fix invalid link issue.
@SethTisue SethTisue merged commit c0941e7 into scala:language-reference-stable Apr 12, 2023
@SethTisue
Copy link
Member

Thank you!

@liang3zy22 liang3zy22 deleted the patch-1 branch April 12, 2023 23:00
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.

3 participants