-
Notifications
You must be signed in to change notification settings - Fork 71
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
Don't render parens for case objects in union member nodes #1600
Conversation
@@ -426,6 +427,7 @@ private[internals] object TypedNode { | |||
def map[B](f: A => B): AltValueTN[B] = this match { | |||
case ProductAltTN(value) => ProductAltTN(f(value)) | |||
case TypeAltTN(value) => TypeAltTN(f(value)) | |||
case UnitAltTN => UnitAltTN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: this is my third implementation of the fix, I think it's the most principled as AltValueTN
now more accurately mirrors the UnionMember
ADT used on the schema side of things.
(member.getMemberName(), member.tpe.map(Left(_))) | ||
} else { | ||
(member.getMemberName(), member.tpe.map(Right(_))) | ||
.flatMap { member => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: this change is no longer necessary, it's merely a refactor. I left it in because the original seemed needlessly duplicative.
Closes #1599
PR Checklist (not all items are relevant to all PRs)