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

type of Stream.partition with refinement incorrectly narrowed, signature is flipped #4001

Open
timm-stelzer-e-farm opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@timm-stelzer-e-farm
Copy link

What version of Effect is running?

3.10.16

What steps can reproduce the bug?

Use Stream.partition with some refinement (_: A | B): _ is A. Compare the types of the two returned streams.
See https://effect.website/play#e46514f8e5a0

What is the expected behavior?

Left stream should be the type of the refinement, i.e. A, right stream should be the exclusion, i.e. B.

What do you see instead?

Type signature is flipped, left is B, right is A.

Additional information

Runtime behavior seems to match the documentation and seems to be correct.

Issue was reported before in discord in https://discord.com/channels/795981131316985866/885826410948722718/1152155890565267476 and in https://discord.com/channels/795981131316985866/885826410948722718/1246063941902274602.

@timm-stelzer-e-farm timm-stelzer-e-farm added the bug Something isn't working label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant