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 approximateOr of (A & Double) | Null #16241

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Oct 24, 2022

[test_non_bootstrapped]

@dwijnand dwijnand linked an issue Oct 24, 2022 that may be closed by this pull request
@dwijnand dwijnand self-assigned this Oct 24, 2022
@dwijnand dwijnand changed the title Fix handling of baseType of (A & Double) | Null Fix approximateOr of (A & Double) | Null Oct 24, 2022
@dwijnand dwijnand force-pushed the fix-handling-null-in-baseType branch from 754b68e to 8e5e7d0 Compare October 25, 2022 11:52
def orBaseClasses(tp: Type): List[ClassSymbol] = tp.stripTypeVar match
case OrType(tp1, tp2) =>
if tp1.isBottomType && (tp1 frozen_<:< tp2) then orBaseClasses(tp2)
else if tp2.isBottomType && (tp2 frozen_<:< tp1) then orBaseClasses(tp1)
Copy link
Member Author

Choose a reason for hiding this comment

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

Similar to e65305d (#11979)

@dwijnand dwijnand assigned noti0na1 and unassigned dwijnand Oct 25, 2022
@dwijnand dwijnand marked this pull request as ready for review October 25, 2022 16:11
@dwijnand dwijnand force-pushed the fix-handling-null-in-baseType branch from 8e5e7d0 to 36a9a9f Compare October 26, 2022 07:29
Copy link
Member

@noti0na1 noti0na1 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@michelou
Copy link
Contributor

@dwijnand Nice cleanup !

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Yes, nice cleanup!

@dwijnand dwijnand merged commit 6c521ae into scala:main Oct 27, 2022
@dwijnand dwijnand deleted the fix-handling-null-in-baseType branch October 27, 2022 07:39
@Kordyjan Kordyjan added this to the 3.2.2 milestone Aug 1, 2023
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.

assertion failed: <notype> & A / NoType & A
5 participants