Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
@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