8000 Fix pruning on union types when a service implements multiple services by kyri-petrou · Pull Request #8934 · zio/zio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix pruning on union types when a service implements multiple services #8934

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 3 commits into from
Jun 12, 2024

Conversation

kyri-petrou
Copy link
Contributor

It seems that #8846 accidentally introduced a bug where pruning on a union type containing services that are implemented by the same service throws an error.

Previously, the following code:

trait Foo
trait Bar
final class FooBar extends Foo, Bar

@main def broken =
  ZEnvironment(new FooBar).prune[Foo & Bar]

throws this error:

java.lang.Error: Defect in zio.ZEnvironment: HashSet(Bar) statically known to be contained within the environment are missing

@ghostdogpr ghostdogpr merged commit f6c7d39 into zio:series/2.x Jun 12, 2024
21 checks passed
@ghostdogpr ghostdogpr deleted the fix-subtype-pruning branch June 12, 2024 02:59
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
0