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: Schema.extend with nested union #2396

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

sukovanej
Copy link
Contributor

Started failing probably after the union flattening removal.

@sukovanej sukovanej requested a review from gcanti as a code owner March 23, 2024 22:02
Copy link

changeset-bot bot commented Mar 23, 2024

🦋 Changeset detected

Latest commit: 09496c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@effect/schema Patch
@effect/cli Patch
@effect/experimental Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/platform Patch
@effect/rpc-http Patch
@effect/rpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gcanti gcanti added the schema label Mar 24, 2024
@gcanti gcanti merged commit d17a427 into Effect-TS:main Mar 24, 2024
12 checks passed
@github-actions github-actions bot mentioned this pull request Mar 23, 2024
@@ -2335,7 +2335,11 @@ const intersectUnionMembers = (
AST.Union.make(
xs.flatMap((x) => {
return ys.map((y) => {
if (AST.isTypeLiteral(x)) {
if (AST.isUnion(x)) {
return intersectUnionMembers(x.types, [y], path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Notice that this will create sub-unions, we could un-nest them, see #2398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants