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 13493: compute union of child types for mirror #15007

Closed
wants to merge 1 commit into from

Conversation

bishabosha
Copy link
Member

based on #15006

for each part of the union compute a separate child type, then compute the lub.

closes #13493

@bishabosha
Copy link
Member Author

@odersky looking at this implementation it makes me wonder if we want to support union types at all, what do you think?

Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

I'm feel like I'm convinved, but would be good to get Martin to check as well.

@bishabosha
Copy link
Member Author

for clarity, the reason that each part of the union is computed with separate constraints is to avoid making an intersection type

@odersky
Copy link
Contributor

odersky commented May 23, 2022

I am not so familiar with mirrors anymore to be able to say whether or not we should support mirrors for unions.

@odersky odersky assigned bishabosha and unassigned odersky May 23, 2022
@bishabosha
Copy link
Member Author

bishabosha commented May 24, 2022

I think it would make it easier to completely ban them - especially with all the type computations necessary to produce mirrors.

@bishabosha
Copy link
Member Author

closing in favour of #15279

@bishabosha bishabosha closed this May 24, 2022
@bishabosha bishabosha deleted the fix-13493 branch May 8, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

summon Mirror of a union type has incorrect children
3 participants